Limited Time Offer:Up to 20% off Hello Interview Premium
Up to 20% off Hello Interview Premium 🎉
Hello Interview
Your Dashboard
System Design
Code
Low Level Design
Behavioral
AI Coding
New
ML System Design
Salary Negotiation
Interview Guides
Blog
System Design
Low Level Design
AI Coding
Behavioral
New
Interview Questions
Success Stories
System Design
Low-Level Design
New
Ask The Community
Discord
Mock Interviews
1:1 Mentorship
Refer a Friend
Pricing
Sign in / Sign up
Search
⌘K
Pricing

Tutor

Implement Task Queue with Priority Management

Design and implement a task queue system that manages tasks with ID, priority, and command properties, supporting operations to add tasks, retrieve highest priority tasks, mark completion, and track pending/completed counts.

Asked at:

Apple


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Company
​
Level
All Regions
Region

Late December, 2025

Apple

Senior

Almost same as Leetcode #3408 Design Task Manager. I was given boilerplate code to implement the different functions. 4 parts to the problem, solve progressively. Implement a Task queue class, where each task has Id, Priority and command (str). Implement following functions to 1. add a task to queue 2. retrieve from the queue. Should return task with highest priority (0 is highest), in case of multiple tasks with same priority return first in. 3. mark the task as completed. Mark the task as completed from Pending. 4. return number of pending and completed tasks.

Your account is free and you can post anonymously if you choose.

Hello Interview Premium

Recent interview questions
System Design Guided Practice
Exclusive content
Learn More
Questions
Meta SWE Interview QuestionsAmazon SWE Interview QuestionsGoogle SWE Interview QuestionsOpenAI SWE Interview QuestionsEngineering Manager (EM) Interview Questions
Learn
Learn System DesignLearn DSALearn BehavioralLearn ML System DesignLearn Low Level DesignGuided Practice
Links
FAQPricingGift PremiumHello Interview Premium
Legal
Terms and ConditionsPrivacy PolicySecurity
Contact
About UsProduct Support

7511 Greenwood Ave North Unit #4238 Seattle WA 98103


© 2026 Optick Labs Inc. All rights reserved.