sebastian-sz
sebastian-sz
MModular
Created by sebastian-sz on 5/19/2024 in #community-showcase
heapq.mojo - A Python's priority queue rewritten in Mojo.
Hi everyone, I wanted to share my implementation of heapq for Mojo, which you can find here: https://github.com/sebastian-sz/heapq.mojo This is a minimalistic, single-file implementation of a Priority Queue (minheap) in Mojo, largely mimicking Python's functionality. While I know the concept isn't new and that existing Mojo implementations have already been posted (e.g., https://discord.com/channels/1087530497313357884/1240078204920926248/1240078204920926248), I wrote this mostly for educational purposes to explore Mojo and its tooling. I thought I'd share it in case others find it useful or interesting. Thanks for checking it out! Best, Sebastian
3 replies