Paytm (One97 Communications Limited) interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Paytm (One97 Communications Limited)
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 Months
Topics: Data structures, algorithms, oops, databases,Dynamic programming, recursion, backtracking, trees, graphs
Tip
Tip

Tip 1 : Prepare the basics firstly.
Tip 2 : No need to cover every topic in a fast pace. Take things slow and steady. 
Tip 3 : Be disciplined . Dedicate a time slot to prepare for the topics.

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

Tip 1 : Resume should be well structured and must not contain irrelevant details like hobbies.
Tip 2 : Include atleast 2 projects and know about the in and out of those projects properly.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 Minutes
Interview date9 Aug 2021
Coding problem2

The online round was at 9 AM.
The coding env was very friendly. It didnt lag at all.
There was camera monitoring.

1. Bottom Right View of Binary Tree

Easy
10m average time
90% success
0/40
Asked in companies
Paytm (One97 Communications Limited)Paytm (One97 Communications Limited)Dunzo

Given a binary tree. Your task is to print the bottom right view of the binary tree.

Bottom right view, on viewing the given binary tree at the angle of 45 degrees from the bottom right side.

For Example

alt text

In the above binary tree, only node { 4, 5, 6 } is visible from the bottom right only node ‘1’ and node ‘3’ are hidden behind node ‘6’.
node ‘2’ is hidden behind node ‘5’.
Problem approach

1. The problem can be solved using simple recursive traversal. 
2. We can keep track of level of a node by passing a parameter to all recursive calls.
3. The idea is to keep track of maximum level also. 
4. And traverse the tree in a manner that right subtree is visited before left subtree. 
5. Whenever we see a node whose level is more than maximum level so far, we print the node because this is the last node in its level .

Try solving now

2. Maximum Subarray Sum

Moderate
35m average time
81% success
0/80
Asked in companies
Expedia GroupSnapdealInfo Edge India (Naukri.com)

You are given an array 'arr' of length 'n', consisting of integers.


A subarray is a contiguous segment of an array. In other words, a subarray can be formed by removing 0 or more integers from the beginning and 0 or more integers from the end of an array.


Find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.


The sum of an empty subarray is 0.


Example :
Input: 'arr' = [1, 2, 7, -4, 3, 2, -10, 9, 1]

Output: 11

Explanation: The subarray yielding the maximum sum is [1, 2, 7, -4, 3, 2].
Problem approach

The simple idea is to look for all positive contiguous segments of the array (max_ending_here is used for this). And keep track of the maximum sum contiguous segment among all positive segments (max_so_far is used for this). Each time we get a positive-sum compare it with max_so_far and update max_so_far if it is greater than max_so_far.

Initialize:
max_so_far = INT_MIN
max_ending_here = 0

Loop for each element of the array
(a) max_ending_here = max_ending_here + a[i]
(b) if(max_so_far < max_ending_here)
max_so_far = max_ending_here
(c) if(max_ending_here < 0)
max_ending_here = 0
return max_so_far

Try solving now
02
Round
Medium
Video Call
Duration45 Minutes
Interview date9 Aug 2021
Coding problem1

The round was at 12 PM . 
The interviewer was very friendly.
We started with a brief introduction of ourselves and then he proceeded with the coding questions.

1. Trapping Rain Water

Moderate
15m average time
80% success
0/80
Asked in companies
SalesforcePayPalHexaware Technologies

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

I started of with the bruteforce approach to calculate nearest left and nearest right larger height and thereby keep on adding the result.
I then gave a more optimised approach of keeping a left height and right height array and then calculating the result by adding the result for each iteration.

Algorithm: 
Create two arrays left and right of size n. create a variable max_ = INT_MIN.
Run one loop from start to end. In each iteration update max_ as max_ = max(max_, arr[i]) and also assign left[i] = max_
Update max_ = INT_MIN.
Run another loop from end to start. In each iteration update max_ as max_ = max(max_, arr[i]) and also assign right[i] = max_
Traverse the array from start to end.
The amount of water that will be stored in this column is min(a,b) – array[i],(where a = left[i] and b = right[i]) add this value to total amount of water stored

Try solving now
03
Round
Medium
Video Call
Duration50 minutes
Interview date9 Aug 2021
Coding problem2

This round was final round.
The interviewer was a hiring manager at paytm. 
Started off with a brief introduction and then with a DP question.

1. Rod cutting problem

Moderate
40m average time
75% success
0/80
Asked in companies
SamsungRazorpayPaytm (One97 Communications Limited)

Given a rod of length ‘N’ units. The rod can be cut into different sizes and each size has a cost associated with it. Determine the maximum cost obtained by cutting the rod and selling its pieces.

Note:
1. The sizes will range from 1 to ‘N’ and will be integers.

2. The sum of the pieces cut should be equal to ‘N’.

3. Consider 1-based indexing.
Problem approach

1. A naive solution to this problem is to generate all configurations of different pieces and find the highest-priced configuration. This solution is exponential in terms of time complexity.
2. We can get the best price by making a cut at different positions and comparing the values obtained after a cut. We can recursively call the same function for a piece obtained after a cut.
Let cutRod(n) be the required (best possible price) value for a rod of length n. cutRod(n) can be written as follows.
cutRod(n) = max(price[i] + cutRod(n-i-1)) for all i in {0, 1 .. n-1}
Time Complexity: O(n2)

Space Complexity: O(n2)+O(n)
3. I then used an array to store maximum value.
static int cutRod(int price[],int n)
{
int val[] = new int[n+1];
val[0] = 0;

// Build the table val[] in bottom up manner and return
// the last entry from the table
for (int i = 1; i<=n; i++)
{
int max_val = Integer.MIN_VALUE;
for (int j = 0; j < i; j++)
max_val = Math.max(max_val,
price[j] + val[i-j-1]);
val[i] = max_val;
}

return val[n];
}

Try solving now

2. DBMS Question

Explain ACID properties in DBMS like SQL

Problem approach

Tip 1 : Learn the concepts of SQL.
Tip 2 : Try to solve sample questions available on the net.
Tip 3 : Think out loud while building approach.

Here's your problem of the day

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

Skill covered: Programming

To make an AI less repetitive in a long paragraph, you should increase:

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Paytm (One97 Communications Limited)
923 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Paytm (One97 Communications Limited)
716 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 10 problems
Interviewed by Paytm (One97 Communications Limited)
541 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 8 problems
Interviewed by Paytm (One97 Communications Limited)
521 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114453 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57719 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34914 views
7 comments
0 upvotes