Skip to main content

Rappi Coding Interview Questions

25 Rappi coding interview problems with full optimal solutions — 8 easy, 12 medium, 5 hard. Every problem ships with multiple approaches (brute-force first, then the optimal), complexity tables for each, company-specific tips on what an Rappi interviewer values, and a FAQ section.

  • #1easyfoundational

    1. Two Sum

    Find two indices whose values sum to a target — Rappi frames this as finding two courier earnings entries that sum to a promised payout.

  • #2easyfoundational

    2. Same Tree

    Decide if two binary trees are structurally identical — Rappi frames this as confirming two dispatch routing trees produce the same courier hand-off sequence.

  • #4easyfoundational

    4. Best Time to Buy and Sell Stock

    Find the max profit from one buy and one sell in a price series — Rappi frames this as picking the best courier-rate window to lock in for a delivery cohort.

  • #5easyfoundational

    5. Single Number

    Find the one element that appears once when every other element appears twice — Rappi frames this as finding the odd-out courier ID in a paired-shift roster.

  • #6easyfoundational

    6. Linked List Cycle

    Detect whether a linked list contains a cycle — Rappi frames this as catching a circular hand-off in a courier-to-courier relay before it deadlocks dispatch.

  • #7easyfoundational

    7. Min Stack

    Design a stack that supports push, pop, top, and retrieving the minimum in constant time — Rappi frames this as tracking the lowest-ETA candidate in a dispatch queue without rescanning.

  • #8easyfoundational

    8. Majority Element

    Find the element that appears more than half the time in an array — Rappi frames this as finding the dominant pickup zone in a streaming feed of courier check-ins.

  • #9mediumfoundational

    9. Number of Islands

    Count connected '1' clusters in a grid — Rappi frames this as counting connected delivery-demand hotspots on a city heatmap to allocate courier supply.

  • #10mediumfoundational

    10. Course Schedule

    Determine if all courses can be finished given prerequisite pairs — Rappi frames this as validating that a multi-stop delivery route has no circular pickup-then-drop dependency.

  • #11mediumfoundational

    11. Kth Largest Element in an Array

    Find the kth-largest element of an unsorted array — Rappi frames this as picking the kth-fastest courier from a city-wide ETA leaderboard for batched dispatch.

  • #12mediumfoundational

    12. Coin Change

    Compute the fewest coins needed to make a target amount — Rappi frames this as composing the minimum number of stacked courier surcharges to hit a promised payout.

  • #13mediumfoundational

    13. Top K Frequent Elements

    Return the k most frequent elements in an array — Rappi frames this as ranking the top-k busiest pickup zones from a stream of dispatch events.

  • #14mediumfoundational

    14. Find All Anagrams in a String

    Return the start indices of all anagrams of p in s — Rappi frames this as scanning a stream of dispatch log lines for any permutation of a known fraud-signature substring.

  • #15mediumfoundational

    15. Subarray Sum Equals K

    Count contiguous subarrays summing to k — Rappi frames this as counting time-windows where cumulative delivery revenue exactly matches a guaranteed payout.

  • #16mediumfoundational

    16. Daily Temperatures

    For each day, find how many days until a warmer temperature — Rappi frames this as how many dispatch ticks until a courier sees a higher-priority order than the current one.

  • #17mediumfoundational

    17. Rotting Oranges

    Compute the minimum minutes until every fresh orange is rotten given grid spread rules — Rappi frames this as the minimum dispatch ticks until a supply-shortage hotspot propagates across an entire delivery zone.

  • #18mediumfoundational

    18. Max Consecutive Ones III

    Find the longest substring of ones if you can flip at most k zeros — Rappi frames this as finding the longest continuous on-time delivery streak per courier when you can forgive up to k delays.

  • #19mediumfoundational

    19. Design Underground System

    Track passengers checking in and out of stations and report average travel time between any two stations — Rappi frames this as tracking courier check-in/check-out at pickup and drop-off zones to compute average leg-time for ETA models.

  • #20mediumfoundational

    20. Number of Zero-Filled Subarrays

    Count contiguous subarrays consisting entirely of zeros — Rappi frames this as counting idle windows in a courier's status stream to find under-utilization.

  • #21hardfoundational

    21. Sliding Window Maximum

    Return the max in each window of size k as it slides across the array — Rappi frames this as reporting the peak courier supply in a rolling time-window during dispatch matching.

  • #22hardfoundational

    22. Find Median from Data Stream

    Support addNum and findMedian on a streaming sequence of integers — Rappi frames this as tracking the running median delivery ETA across an open stream of in-flight orders.

  • #23hardfoundational

    23. LFU Cache

    Implement a least-frequently-used cache with O(1) get and put — Rappi frames this as caching hot pickup-zone lookups in dispatch where stale low-traffic zones must be evicted first.

  • #24hardfoundational

    24. Basic Calculator

    Evaluate a string containing +, -, parentheses and integers — Rappi frames this as parsing a nested promo-rule expression like '(base + tip) - discount' applied to a courier payout statement.

  • #25hardfoundational

    25. Maximum Number of Tasks You Can Assign

    Given task strengths, worker strengths, available pills that each boost one worker by a fixed amount, find the max tasks completable — Rappi frames this as the max number of delivery orders matchable to couriers when a fixed pool of surge-credits can boost capacity.

Rappi Coding Interview Questions — Full Solutions — InterviewChamp.AI