37 questions · from 15 interviews

Razorpay interview questions

Every question candidates reported from their Razorpay interviews, most frequently asked first. Each links to the write-up it came from, so you can see the round and how it went.

Razorpay coding and DSA questions

  1. 01

    Design Load Balancer (Machine Coding)

    The task was to design a load balancer as a REST application. It needed endpoints to manage configurations such as adding/removing backend servers, updating timeouts, and healthcheck endpoints. All other routes were expected to be load balanced and sent to…

    From RazorPay | Lead Software Engineer | Bangalore

  2. 02

    LFU Cache Implementation

    Implement a cache using the Least Frequently Used (LFU) eviction policy. When the cache reaches its capacity, remove the least frequently used key. If there's a tie, remove the smallest key among those with the least frequency. Function Signature: python def…

    From Razorpay | OA (1st Round) | Senior MLE | Bengaluru

  3. 03

    Minimum Points Partition of String

    You're given a string S. Split it into parts such that each character appears in at most one part. The score of a part is the square of its length. Minimize the total score across all parts. Function Signature: python def solve(S: str) - int Scoring Rule: -…

    From Razorpay | OA (1st Round) | Senior MLE | Bengaluru

  4. 04

    Min Cost with Constraints (Knapsack Variant)

    You're given N types of chip packets, each with: - happiness A[i] - weight B[i] - cost C[i] Alice wants at least X happiness and at most Y total weight while minimizing the cost. Function Signature: python def solve(N: int, A: List[int], B: List[int], C:…

    From Razorpay | OA (1st Round) | Senior MLE | Bengaluru

  5. 05

    In-Memory Search Engine Design

    Design and implement an in-memory search engine supporting search functionality on blog content. Requirements include: It should be possible to create a dataset in the search engine. It should be possible to insert and delete documents in a given dataset.…

    From Razorpay | Senior Software Engineer | Interview Experience | April 2025 | Rejected

  6. 06

    N-digit Numbers with Prime/Non-Prime Digits and Modulo K

    You are given three integers N, M, and K, and you need to find the count of N-digit numbers satisfying the following conditions: Prime-indexed positions (e.g., 2, 3, 5, 7...) should have prime digits (2, 3, 5, 7). Non-prime-indexed positions (e.g., 1, 4, 6,…

    From Sharing My Razorpay SDE Intern OA Experience

  7. 07

    Minimum Time to Reach Master Server

    You are given n servers numbered from 1 to n, with server n being the master server. Each server can send a message forward or backward based on a given time. The task was to calculate the minimum time required for each server to send a message to the master…

    From Sharing My Razorpay SDE Intern OA Experience

  8. 08

    Minimize Max Difference After Removing K Cubes

    You are given N wooden cubes with distinct side lengths arranged in non-decreasing order. The first and last cubes are fixed. The task was to remove exactly K cubes to minimize the maximum difference (diff) between the side lengths of two adjacent cubes.

    From Sharing My Razorpay SDE Intern OA Experience

  9. 09

    Zigzag Traversal of Matrix

    Implement a function to perform a zigzag traversal of a given matrix, printing elements alternately from left-to-right and right-to-left for each subsequent row.

    From RazorPay Product Engineer -2 (Backend) Reject

  10. 10

    Detect Cycle in Linked List

    Given the head of a singly linked list, determine if it contains a cycle. A cycle means that some node in the list can be reached again by continuously following the next pointers.

    From RazorPay Product Engineer -2 (Backend) Reject

  11. 11

    Intersection of Two Linked Lists

    Given the heads of two singly linked lists, headA and headB , return the node at which the two lists intersect. If the two lists have no intersection at all, return null .

    From RazorPay Product Engineer -2 (Backend) Reject

  12. 12

    Find Single Non-Duplicate in Array 1 to N

    Given an array containing numbers in the range 1 to n , where all numbers appear twice except for one which appears once, find that non-duplicate number. You are allowed to modify the input array.

    From RazorPay Product Engineer -2 (Backend) Reject

  13. 13

    Find Duplicates in Sorted and Unsorted Arrays

    Given an array, identify and return a number that has occurred exactly twice. Provide a solution for when the array is sorted (hint: use binary search) and another solution for when the array is unsorted (hint: use XOR logic).

    From RazorPay Product Engineer -2 (Backend) Reject

  14. 14

    Maximum Sum Subarray (Kadane's Algorithm)

    Given an integer array nums , find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. I clarified with the interviewer if the question was to find the maximum sum of a subarray or a subset.

    From RazorPay Product Engineer -2 (Backend) Reject

Razorpay system design questions

  1. 01

    Design and Implement an ATM Machine (LLD)

    Design and implement an ATM Machine. This LLD round covered complete low-level design with proper class design including ATM, BankAccount, Card, Transaction, CashDispenser, etc. I implemented core flows such as Card validation & PIN authentication, Balance…

    Hard · From Interview experience at @RazorPay SDE II

  2. 02

    Design WhatsApp (HLD)

    Design WhatsApp. The discussion areas included high-level components such as Client (Mobile App), Backend services, Database & message storage, and basic message flow. I discussed one-to-one messaging at a high level and talked about some trade-offs related…

    Hard · From Interview experience at @RazorPay SDE II

  3. 03

    Design Job Scheduler

    Design a system for a job scheduler. This was my first system design interview, and I felt I performed pretty well.

    From RazorPay | Lead Software Engineer | Bangalore

  4. 04

    Design Google Docs with ACL

    The discussion focused on designing Google Docs, specifically emphasizing storage mechanisms, database schema, and the actual implementation of synchronization, along with Access Control Lists (ACL).

    From RazorPay | Lead Software Engineer | Bangalore

  5. 05

    Low-Level Design: Git Version Control System

    Design a Version Control System (VCS) similar to Git, with a strong emphasis on keeping the code extensible. The system should implement the following functionalities: 1. init: Initialize a new repository. 2. add : Stage files matching the given regex. 3.…

    Hard · From Razorpay SDE2 Interview

  6. 06

    Design In-Memory SQL-like Database

    Design an in-memory SQL-like database with the following features: - You should be able to store rows. - Column could be of int, string or boolean datatype. - We should be able to set a primary key or set of primary keys. - Create index on the primary key. -…

    From Razorpay round 1 interview experience

  7. 07

    Machine Coding: Search Engine Design

    Design a search engine-like system with the following functionalities: Ability to add and remove documents (consider documents as strings). Efficiently return a list of all documents containing all words in the search query. Documents should be searchable via…

    Hard · From Razorpay Machine Coding Round [Rejected] [SSE]

  8. 08

    Design In-Memory Pub-Sub Model

    Design an in-memory Pub-Sub model with features like producer, consumer, subscription, and handling offsets.

    From Razorpay | SSE

  9. 09

    Design Config Manager Service

    Design a config manager service that can be called by internal and external services to serve custom configurations for specific users. The discussion also included logging and monitoring.

    From Razorpay | SSE

  10. 10

    Low-Level Design: Pub-Sub Queue

    Implement a persistent pub-sub queue mechanism with guaranteed delivery of every published message for all the subscribed consumers in that subscribed topic in the same order.

    From razorpay | sde2 | interview experience

  11. 11

    High-Level Design: Job Scheduler

    accept a file(job) and time/cron expression and schedule the jobs

    From razorpay | sde2 | interview experience

  12. 12

    Design LeetCode Leaderboard

    Design the LeetCode platform, with a specific focus on the Leaderboard design. I shared diagrams for my proposed design.

    From Razorpay | Senior Software Engineer | Interview Experience | April 2025 | Rejected

  13. 13

    AWS Lambda Down Scenario

    What if AWS Lambda goes down?

    From Razorpay | Senior Software Engineer | Interview Experience | April 2025 | Rejected

  14. 14
  15. 15

    AWS Lambda Cold Start Mitigation

    How to handle AWS Lambda Cold Start?

    From Razorpay | Senior Software Engineer | Interview Experience | April 2025 | Rejected

  16. 16

    System Design Test Cases

    How will we run test cases for the designed system?

    From Razorpay | Senior Software Engineer | Interview Experience | April 2025 | Rejected

  17. 17

    Stale Data Handling

    How to handle stale data in the designed system?

    From Razorpay | Senior Software Engineer | Interview Experience | April 2025 | Rejected

  18. 18

    Database Choice Justification

    What is the reason behind choosing a NoSQL/SQL DB?

    From Razorpay | Senior Software Engineer | Interview Experience | April 2025 | Rejected

  19. 19

    Low-Level Design: Photo-Sharing App

    I was asked to design a photo-sharing application. The design needed to incorporate a minimum of six distinct features, and there was also a bonus feature to consider. The subsequent discussion primarily focused on demonstrating understanding of design…

    From Razorpay | SDE-1 | Interview | Selected

  20. 20

    Design Rate Limiter with Sliding Window

    Design a rate limiter system and implement it using the sliding window algorithm.

    From Razorpay | Senior Software Engineer

  21. 21

    Design Wallet System

    Design a complete wallet system.

    From Razorpay | Senior Software Engineer

  22. 22

    Design Rating Service

    Design a Rating service with the initial requirement for a single user, then extend it to support multiple users. The service should function similarly to a survey system where users can provide ratings.

    From Razorpay SDE interview

Razorpay other questions

  1. 01

    Build a Carousel Component

    Build a carousel component. I was also asked some of the followup questions regarding UI/UX improvements.

    From Razorpay || SDE 1 (Frontend Engineer)

Razorpay interview questions FAQ

What questions are asked in Razorpay interviews?

Candidates reported 37 distinct questions across 15 Razorpay interviews. 14 coding and DSA questions, 22 system design questions, 1 other questions.