MEDIUMasked at 3 companies

Immediate Food Delivery II

A medium-tier problem at 54% community acceptance, tagged with Database. Reported in interviews at Tencent and 2 others.

Founder's read

Immediate Food Delivery II is a medium-difficulty database problem that tests your ability to write efficient SQL queries against real-world delivery logistics data. It's asked at Tencent, Swiggy, and DoorDash, companies that live and die by delivery speed. The 54% acceptance rate signals this isn't a straightforward SELECT statement. You'll need to understand window functions, date arithmetic, or complex filtering logic to surface the right subset of orders. This is the kind of problem that looks simple until you realize your first query times out or returns the wrong cohort.

Companies asking
3
Difficulty
MEDIUM
Acceptance
54%

Companies that ask "Immediate Food Delivery II"

If this hits your live OA

Immediate Food Delivery II is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround.

Get StealthCoder
What this means

The core trick here involves calculating delivery metrics at the order or customer level while filtering for a specific time window or condition. Most candidates write a basic join and aggregate, which works on small test cases but misses the actual business logic. The catch is usually in how you define 'immediate' delivery, whether that's based on order timestamps, delivery times, or some calculated window. You'll likely need window functions like ROW_NUMBER or DENSE_RANK to partition data correctly, or a subquery to isolate qualifying orders before aggregating. If you hit this on your live assessment and freeze on the query structure, StealthCoder surfaces a working solution in seconds, invisible to the proctor, so you can paste and move forward.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

Immediate Food Delivery II recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Built because the OA filter rejects engineers who'd pass the on-site. That's a broken filter. This is the workaround. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Immediate Food Delivery II interview FAQ

Is this problem harder than typical database questions?+

Yes. The 54% acceptance rate and medium difficulty sit above standard SQL drills. The problem requires understanding business logic, not just syntax. You need to reason about what 'immediate' means in the delivery context and translate that into a query.

What database concepts do I need to know?+

Window functions (ROW_NUMBER, RANK, etc.), date/time arithmetic, aggregation with GROUP BY, and subqueries are essential. If you're weak on window functions, this problem will expose that gap fast.

Do I need to optimize for performance?+

Yes. Delivery companies run these queries on millions of rows. Your solution needs to be indexed-friendly and avoid expensive operations like multiple self-joins or correlated subqueries where a window function would work.

Is this still asked at DoorDash and Swiggy?+

Yes, it appears in their technical assessments. Delivery logistics are core to their business, so expect variations of this problem if you interview there.

What's the most common mistake?+

Miscalculating the time window or filtering condition. Candidates often aggregate before filtering, or use the wrong order timestamp. Read the problem statement twice and trace your logic with the examples first.

Want the actual problem statement? View "Immediate Food Delivery II" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.