Skip to contentSkip to content
Verified credentials. On-chain. Forever.Learn more
Cover image for Replace a Naive List with a Heap in a Delivery Dispatcher
Code

Replace a Naive List with a Heap in a Delivery Dispatcher

FreeVerified credential1 weekBeginner

Overview

What this challenge is about.

Read the current dispatcher source (around 400 lines of Python). Identify the linear scan and the operations that touch it (insert, decrease-key on a re-scored courier, extract-min). Implement a binary min-heap with a sibling index for decrease-key in O(log n). Replace the list with the heap. Benchmark with the provided 30-minute production-shaped trace (around 22M operations). Deliver a Git branch with the refactor, a benchmark report showing CPU and tail-latency before/after, and a 4-page writeup that any junior engineer on the team can read.

CredentialBlockchain-anchored
ShareableLinkedIn-ready
LanguageEnglish
PaceSelf-paced

The Brief

What you'll do, and what you'll demonstrate.

Refactor a dispatcher's courier selection from a linear scan over 4,000 records to a binary min-heap and prove the win on a production-shaped trace.

Earning criteria — what you'll demonstrate

  • Recognize when a linear scan should become a heap
  • Implement decrease-key in a binary heap with an auxiliary index
  • Benchmark a real Python service, not a synthetic micro-benchmark
  • Explain a data-structure change in writing for a teammate

Program Fit

Where this fits in your program.

Sharpens the same skills your degree expects you to demonstrate.

Skills

Skills you'll demonstrate.

Each one shows up on your verified credential.

Careers

Roles this prepares you for.

Real titles. Real skill bridges. Pick the one closest to your trajectory.

Career mappings coming soon.

One more thing

You can put a credential on your CV by Friday.