Razorpay interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Razorpay
upvote
share-icon
4 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data structures and algorithms, Low-level design, OS, DBMS, Oops, SQL,
Tip
Tip

Tip 1: Focus on DSA mostly
Tip 2: Practice contest, or if have time issues with live contests then try giving virtual contests
Tip 3 : Get ready with low-level design at least for Razorpay
Tip 4 : Have at least 2 major projects (try to deploy your project)
Tip 5 : While practicing DSA questions try to focus on pattern recognition

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Keep the one-page resume
Tip 2 : Use overleaf latex templates if you can

Interview rounds

01
Round
Easy
Online Coding Interview
Duration90 minutes
Interview date14 Oct 2021
Coding problem3

8 MCQ based on CS fundamentals eg. OS, DBMS, SQL, OOPs
3 DSA questions (Medium to upper-medium difficulty)

1. Triangles in a graph

Easy
0/40
Asked in company
Razorpay

Problem: Number of triangles in a graph

Given an undirected graph, find how many triangles it can have where a triangle is a cyclic path of length three which begins and end at the same vertex.

An undirected graph is a graph in which if you can go from a vertex, say, ‘A’ to ‘B,’ you can come back to ‘A’ from ‘B.’

For example: In this graph, we can visit from vertex 1 to 2, then we can also visit from vertex 2 to 1. This is true for all vertices.

Try solving now

2. Find Area of Rectangle

Easy
0/40
Asked in company
Razorpay

Take the length(L) and breadth(B) of the rectangle as input and find its area.

Note:
Length and breadth must be an integer value and the area will always be in the range of integers.
Try solving now

3. Longest Common Subsequence

Moderate
0/80
Asked in companies
ShareChatOptumSamsung

You have been given two Strings “STR1” and “STR2” of characters. Your task is to find the length of the longest common subsequence.

A String ‘a’ is a subsequence of a String ‘b’ if ‘a’ can be obtained from ‘b’ by deletion of several (possibly, zero or all) characters. A common subsequence of two Strings is a subsequence that is common to both Strings.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date17 Oct 2021
Coding problem2

Given one DSA question - trapping rainwater problem
One puzzle - minimum races need to conduct between 25 to find out the three fastest horse

1. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
HCL TechnologiesCiti BankAtlassian

You have been given a long type array/list 'arr’ of size 'n’.


It represents an elevation map wherein 'arr[i]’ denotes the elevation of the 'ith' bar.



Note :
The width of each bar is the same and is equal to 1.
Example:
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].

Output: 10

Explanation: Refer to the image for better comprehension:

Alt Text

Note :
You don't need to print anything. It has already been taken care of. Just implement the given function.
Problem approach

The key idea to solve this problem is to understand that rainwater can only be trapped if there exists a block of greater height, both on the left and the right side than the current block. Then rainwater can be trapped on top of the block.

So, it can be easily inferred that the amount of water a block can hold is equal to the minimum of the maximum height present on both the left and right half minus the height of the current block.

Try solving now

2. Puzzle

There are 25 horses among which you need to find out the fastest 3 horses. You can conduct a race among at most 5 to find out their relative speed. At no point, you can find out the actual speed of the horse in a race. Find out the minimum no. of races that are required to get the top 3 horses.

Problem approach

Answer for this is 7 races

first, do 5 races among 5-5 horse
pick all 5 winners and do 1 more race
now do 1 more race between 2nd,3rd winner of 6th race and 2nd,3rd winner of first 5 horse races of 2nd winner of 6th race and 2nd winner of first 5 horses of 3rd winner in 6th race

03
Round
Medium
Video Call
Duration60 minutes
Interview date17 Oct 2021
Coding problem1

Design a system to generate tombola game tickets following design principles, ticket is a matrix of 5X9 with some constrained, system to generate such kind of ticket.

1. System Deisgn

Design a system to generate tombola game tickets following design principles, ticket is a matrix of 5X9 with some constrained, system to generate such kind of ticket.

Problem approach

Make a class name cell that represents each cell of the ticket matrix.
Use set and map and some random function to generate a ticket

Tip : Read low-level design principle

04
Round
Hard
Video Call
Duration60 minutes
Interview date17 Oct 2021
Coding problem2

15 min basic HR conversation
15 min CS fundamental multi-threading, DBMS, concurrency handling, etc.
in the remaining time, similar to regular expression leetcode hard with one more special character

1. Regular Expression Matching

Hard
25m average time
80% success
0/120
Asked in companies
FacebookGrowwSAP Labs

Given an input string 'S' and a pattern 'P', implement a regular expression matching with the support of two special characters ‘.’ (dot) and ‘*’(asterisk) where

1. ‘.’ matches to any single character.
2. ‘*’ matches to zero or more of the preceding element.

If the input string 'S' matches the pattern 'P', then return true else, return false.

Note:
1. You have to match the entire string with the pattern given.

2. Both the strings, 'S' and 'P' contain only lower-case alphabets.

3. Only the pattern will contain additional characters ‘*’ and ‘.’ along with alphabets.
Problem approach

Intuition

As the problem has an optimal substructure, it is natural to cache intermediate results. We ask the question dp(i, j)\text{dp(i, j)}dp(i, j): does text[i:]\text{text[i:]}text[i:] and pattern[j:]\text{pattern[j:]}pattern[j:] match? We can describe our answer in terms of answers to questions involving smaller strings.

Algorithm

We proceed with the same recursion as in Approach 1, except because calls will only ever be made to match(text[i:], pattern[j:]), we use dp(i, j)\text{dp(i, j)}dp(i, j) to handle those calls instead, saving us expensive string-building operations and allowing us to cache the intermediate results.

Try solving now

2. OS Questions

What are multi-threading and concurrency?

Problem approach

Tip 1 : Read OS properly

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 5 problems
Interviewed by Razorpay
3071 views
0 comments
0 upvotes
SDE - 1
2 rounds | 2 problems
Interviewed by Razorpay
1982 views
0 comments
0 upvotes
SDE - 1
3 rounds | 4 problems
Interviewed by Razorpay
0 views
1 comments
0 upvotes
SDE - 1
3 rounds | 4 problems
Interviewed by Razorpay
1421 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes