← Cloudkitchens Interview Insights

Cloudkitchens·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
May 2026

Summary

CloudKitchens SE interview with a meaty coding design question that blended OOP, receipt formatting, and a discount algorithm all in one problem. More system-designy than pure leetcode, which I wasn't fully expecting.

Questions Asked (1)

Q1

You're building a point-of-sale UI for a food ordering system. Given class stubs for Item, Menu, Order, and Display, wire up a callback that fires each time a user taps an item. Part A: update the order and print a receipt showing each item's name, quantity, unit price, line total, subtotal, and grand total. Part B: extend the system to apply combo discounts where a combo is defined by a required item count, a set of eligible item IDs, and a discount type (flat amount off or percent off). After each item tap, find any valid non-overlapping combo application and reprint the receipt with discounts shown.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

This was a lot to hold in your head at once.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements and assumptions, then design a clean data model and callback flow. For Part A, implement the callback to update the order and generate a formatted receipt. For Part B, extend the model with combo definitions and implement an algorithm to find valid non-overlapping combos, applying discounts and updating the receipt accordingly.

Pro tip: Demonstrate foresight by discussing how to handle edge cases like multiple combos, overlapping eligibility, and performance as the menu grows. Also, mention that you would write unit tests for the combo logic to ensure correctness.

1. Clarify Requirements and Assumptions

Ask clarifying questions about the item tap callback, receipt format, combo rules (e.g., can combos stack? how to handle ties?), and any constraints. State your assumptions clearly.

2. Design Data Model and Callback

Define classes for Item, Menu, Order, and Display. Design the callback to be invoked on item tap, updating the order's item list and quantities. Ensure the callback is wired to the UI event.

3. Implement Receipt Generation (Part A)

Write a method to generate a receipt that lists each item's name, quantity, unit price, line total, subtotal, and grand total. Ensure the receipt is printed after each tap.

4. Extend for Combo Discounts (Part B)

Add combo definitions (required item count, eligible item IDs, discount type). Implement an algorithm to find valid non-overlapping combos after each tap, apply discounts, and update the receipt to show discounts and new totals.

5. Test and Optimize

Discuss testing strategies for combo logic, including edge cases. Mention potential optimizations for finding combos efficiently, such as using frequency counts or dynamic programming.

Key Points to Mention

  • Callback design: ensure it's idempotent and updates state correctly.
  • Receipt formatting: include all required fields and handle currency formatting.
  • Combo definition: model as a class with required count, eligible item IDs, and discount type.
  • Non-overlapping combo selection: use a greedy or dynamic programming approach to maximize discounts.
  • Edge cases: multiple combos, partial eligibility, ties in discount value, and performance with large menus.
  • Testing: unit tests for combo logic and receipt generation.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.