Facebook Pixel

What is the Swiggy machine coding interview question?

Build a food ordering app with a menu, search, filters (veg/non-veg, category, price), cart (add, remove, quantity), cart total, and checkout. 90 minutes. They evaluate functionality, code quality, edge cases, UI, and approach.

Verify This Answer

Cross-check this information using these trusted sources:

More FAQs in Food Ordering App: Swiggy Interview Experience

How would you scale for 10,000 items (virtualization, pagination, server-side search)? How would you persist the cart (localStorage, backend)? How would you handle concurrent updates (optimistic UI)? How would you add coupons (discount code on total)?

The cart logic. Managing add, remove, quantity change, and total calculation. Use an object mapping item ID to quantity. Handle quantity 0 (remove from cart). Calculate total by summing price * qty for each item.

10 min: plan data and state. 40 min: build menu rendering and cart. 20 min: add search and filters. 10 min: handle edge cases. 10 min: CSS and testing. Build cart logic first (it is the hardest part).

Still have questions?

Browse all our FAQs or reach out to our support team

Want to upskill yourself?

Our courses are taking a Coffee break, but your curiosity shouldn't. Stay engaged with namastedev linkedin, youtube, discord and other resources while you wait.

0
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.