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

SDE - 2

PayU
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
It all started when I joined my first company. It was a manufacturing company, but I joined there as an intern and later as a Graduate Engineer Trainee. I was not satisfied with the tasks assigned to me, as there was no career growth. So, I started preparing to crack IT product-based companies within a week of joining, aiming for a better career. I began with DSA basics and later solved problems from DSA sheets on coding platforms. After a few weeks, I also started participating in contests. Side by side, I went through system design concepts as well. I appeared for multiple interviews but kept facing setbacks due to hiring freezes or rejections. After two years, I was finally able to crack a product-based company.
Application story
I applied for the Software Engineer role at PayU on Naukri.com and was contacted by a recruiter. I was informed about the interview rounds and the types of questions that could be asked in each round.
Why selected/rejected for the role?
I was selected for the role as I was fully prepared for it. I had a good understanding of Java, DSA, OOP, system design, and the projects I had worked on in my first organization, as well as my personal projects.
Preparation
Duration: 6 Months
Topics: Java, Data Structures, Algorithms, System Design, Android Development
Tip
Tip

Tip 1: Stay consistent with your preparation. It matters, as even small efforts contribute to building a better career.

Tip 2: Don’t get demotivated by rejections. One day, your dream offer will surely come your way.

Tip 3: Make sure you can justify everything you have written in your resume.

Application process
Where: Naukri
Eligibility: You need to be well-versed in DSA, and your resume should include strong projects. (Salary Package: 22 LPA)
Resume Tip
Resume tip

Tip 1: Keep it crisp and clear.

Tip 2: You should be able to justify everything you have written.

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date9 Sep 2025
Coding problem2

This round was scheduled for the evening. It focused on DSA and system design fundamentals. The interviewer was calm, introduced himself, and asked me to introduce myself as well.

1. Next Permutation

Moderate
15m average time
85% success
0/80
Asked in companies
AdobeUberOYO

You have been given a permutation of ‘N’ integers. A sequence of ‘N’ integers is called a permutation if it contains all integers from 1 to ‘N’ exactly once. Your task is to rearrange the numbers and generate the lexicographically next greater permutation.

To determine which of the two permutations is lexicographically smaller, we compare their first elements of both permutations. If they are equal — compare the second, and so on. If we have two permutations X and Y, then X is lexicographically smaller if X[i] < Y[i], where ‘i’ is the first index in which the permutations X and Y differ.

For example, [2, 1, 3, 4] is lexicographically smaller than [2, 1, 4, 3].

Problem approach

1. I first tried a brute-force approach by generating all permutations and finding the smallest one greater than the current one.

2. The interviewer asked me to solve it in a more optimal way.

3. I then used a greedy approach by sorting the desired suffix and swapping the required elements. The interviewer was satisfied with the approach.

Try solving now

2. Project Discussion

The interviewer asked about a project I had worked on in my previous company and then asked me to explain its high-level design. He also asked follow-up questions, including whether I used OAuth 2.0 and some Android fundamentals, since I was applying for an Android Developer role.

Problem approach

Tip 1: You should be able to justify everything you have written in your resume.
Tip 2: If you don’t know an answer and it is not mentioned in your resume, you can honestly say that you don’t know it in depth, as you haven’t worked on it.
Tip 3: Always ask questions to the interviewer after the interview is over.

02
Round
Hard
Video Call
Duration60 minutes
Interview date16 Sep 2025
Coding problem1

This was a pure system design round. The interviewer was calm, introduced himself as the manager of the team, and asked me to introduce myself as well. The round was scheduled in the evening.

1. Android Concepts

The interviewer asked about FCM (Firebase Cloud Messaging), how it works, and what is contained inside the google-services.json and service-account.json files. He also asked about the SMS Retriever API used to retrieve OTPs without the READ SMS permission.

Additionally, he asked about frameworks like Retrofit and Dagger.

Problem approach

Tip 1: Don’t stick to just one framework, even if you have only used one. It is more important to understand the problem it solves and how it works.
Tip 2: If you don’t know an answer, tell the interviewer honestly rather than giving an incorrect answer.
Tip 3: Always ask questions to the interviewer after the interview is over.

03
Round
Hard
Video Call
Duration60 minutes
Interview date17 Sep 2025
Coding problem3

It was held in the evening. The interviewer introduced himself as the Director of Engineering. He was energetic and asked me to introduce myself as well.

1. Koko Eating Bananas

Moderate
25m average time
70% success
0/80
Asked in companies
PayUAtlassianAmazon

A monkey is given ‘n’ piles of bananas, where the 'ith' pile has ‘a[i]’ bananas. An integer ‘h’ is also given, which denotes the time (in hours) in which all the bananas should be eaten.


Each hour, the monkey chooses a non-empty pile of bananas and eats ‘m’ bananas. If the pile contains less than ‘m’ bananas, then the monkey consumes all the bananas and won’t eat any more bananas in that hour.


Find the minimum number of bananas ‘m’ to eat per hour so that the monkey can eat all the bananas within ‘h’ hours.


Example:

Input: ‘n’ = 4, ‘a’ =  [3, 6, 2, 8] , ‘h’ = 7

Output: 3

Explanation: If ‘m’ = 3, then 
The time taken to empty the 1st pile is 1 hour.
The time taken to empty the 2nd pile is 2 hour.
The time taken to empty the 3rd pile is 1 hour.
The time taken to empty the 4th pile is 3 hour.
Therefore a total of 7 hours is taken. It can be shown that if the rate of eating bananas is reduced, they can’t be eaten in 7 hours.
Problem approach

1. I started with a brute force approach of traversing all piles from length 1 to the maximum length of the pile in the array. But it could fail in case of long integers. 
2. The interview was asked to optimise it.
3. Then I went for the Binary Search algorithm and solved it in O (N*log(Maximum element in array)) time complexity. The interviewer was satisfied with this approach.

Try solving now

2. Search In Rotated Sorted Array

Easy
12m average time
85% success
0/40
Asked in companies
OYOPayUZS

You have been given a sorted array/list 'arr' consisting of ‘n’ elements. You are also given an integer ‘k’.


Now the array is rotated at some pivot point unknown to you.


For example, if 'arr' = [ 1, 3, 5, 7, 8], then after rotating 'arr' at index 3, the array will be 'arr' = [7, 8, 1, 3, 5].


Now, your task is to find the index at which ‘k’ is present in 'arr'.


Note :
1. If ‘k’ is not present in 'arr', then print -1.
2. There are no duplicate elements present in 'arr'. 
3. 'arr' can be rotated only in the right direction.


Example:
Input: 'arr' = [12, 15, 18, 2, 4] , 'k' = 2

Output: 3

Explanation:
If 'arr' = [12, 15, 18, 2, 4] and 'k' = 2, then the position at which 'k' is present in the array is 3 (0-indexed).


Problem approach

1. I started with brute force linear search.
2. The interviewer asked to optimise the solution.
3. Then I went for a binary search solution and solved the problem in O (log(n)) time complexity.

Try solving now

3. Trapping Rain Water

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

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

1. I started with brute force approach. For each bar, I scanned all bars to its left and right to find the maximum height, resulting in nested loops.
2. The interviewer asked to optimise the solution.
3. I suggested a stack-based approach, which resulted in a reduction in Time complexity from O (n^2) to O(n).

Try solving now

Here's your problem of the day

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

Skill covered: Programming

Which traversal uses a queue as its primary data structure?

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by PayU
2945 views
0 comments
0 upvotes
company logo
Senior Software Engineer
3 rounds | 6 problems
Interviewed by PayU
2688 views
0 comments
0 upvotes
company logo
Software Engineer
4 rounds | 4 problems
Interviewed by PayU
1524 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 4 problems
Interviewed by PayU
642 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 2
5 rounds | 12 problems
Interviewed by Walmart
30340 views
8 comments
0 upvotes
company logo
SDE - 2
3 rounds | 4 problems
Interviewed by HashedIn
9783 views
0 comments
0 upvotes
company logo
SDE - 2
3 rounds | 5 problems
Interviewed by Amazon
6912 views
1 comments
0 upvotes