InterviewDB Question

TODO List: Implement a TODO List Class with Priority Queue and Deadline Sorting

Question Details

Problem Implement a TODOList class that manages tasks with priorities and optional deadlines. The list should always return the highest-priority, earliest-deadline task next. Example: Follow-ups How do you handle lazy deletion for complete() efficiently with a heap? What happens if two tasks have equal priority and no deadline? How would you add recurring tasks that re-insert after completion? How would you persist and restore the list across process restarts?

Full Details

🔒

Unlock all Notion questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a reported interview question from a notion interview during the onsite round.

It covers the following topics: Coding, Queue, Heap, Onsite .