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

Backend Developer

Paytm (One97 Communications Limited)
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

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

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date11 Jan 2021
Coding problem2

Technical Interview round with 2 DSA problems.

1. Detect cycle in undirected graph

Moderate
0/80
Asked in companies
AmazonAdobeSamsung

You have been given an undirected graph with 'N' vertices and 'M' edges. The vertices are labelled from 1 to 'N'.

Your task is to find if the graph contains a cycle or not.

A path that starts from a given vertex and ends at the same vertex traversing the edges only once is called a cycle.

Example :

In the below graph, there exists a cycle between vertex 1, 2 and 3. 

Example

Note:

1. There are no parallel edges between two vertices.

2. There are no self-loops(an edge connecting the vertex to itself) in the graph.

3. The graph can be disconnected.

For Example :

Input: N = 3 , Edges =  [[1, 2], [2, 3], [1, 3]].
Output: Yes

Explanation : There are a total of 3 vertices in the graph. There is an edge between vertex 1 and 2, vertex 2 and 3 and vertex 1 and 3. So, there exists a cycle in the graph. 
Problem approach

DFS can be used to detect cycle in an undirected graph. Do a DFS traversal of the given graph. For every visited vertex ‘v’, if there is an adjacent ‘u’ such that u is already visited and u is not parent of v, then there is a cycle in graph.

If we don’t find such an adjacent for any vertex, we say that there is no cycle.

Pseudocode :

 

DetectCycle(graph, v, visited[], parent)
{
	// mark the current node as visited
	visited[v] = true;
	// do for every edge (v, w)
	for (w: graph[v])
	{
		// if `w` is not visited yet
		if (!visited[w])
		{
			if (DetectCycle(graph, w, visited, v)) {
				return true;
			}
		}
		// if `w` is visited, and `w` is not a parent
		else if (w != parent)
		{
			// back-edge (cycle) found
			return true;
		}
	} 
	// No back-edges were found in the graph
	return false;
}
Try solving now

2. Zig-Zag Tree Traversal

Easy
10m average time
90% success
0/40
Asked in companies
Goldman SachsAmazonFlexiEle Consulting Services (FE)

You are given a ‘Binary Tree’.


Return the level-order traversal of the Binary Tree.


Example:
Input: Consider the following Binary Tree:

Example

Output: 
Following is the level-order traversal of the given Binary Tree: [1, 2, 3, 5, 6, 4]


Problem approach

This problem can be solved using two stacks.
Assume the two stacks are current: currentlevel and nextlevel. We would also need a variable to keep track of the current level order(whether it is left to right or right to left). We pop from the currentlevel stack and print the nodes value. Whenever the current level order is from left to right, push the nodes left child, then its right child to the stack nextlevel. 
Since a stack is a LIFO(Last-In-First_out) structure, next time when nodes are popped off nextlevel, it will be in the reverse order. On the other hand, when the current level order is from right to left, we would push the nodes right child first, then its left child. Finally, do-not forget to swap those two stacks at the end of each level(i.e., when current level is empty)

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

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

Choose another skill to practice
Similar interview experiences
company logo
Backend Developer
3 rounds | 5 problems
Interviewed by Paytm (One97 Communications Limited)
0 views
0 comments
0 upvotes
company logo
Backend Developer
2 rounds | 3 problems
Interviewed by Paytm (One97 Communications Limited)
563 views
0 comments
0 upvotes
company logo
Backend Developer
2 rounds | 3 problems
Interviewed by Paytm (One97 Communications Limited)
646 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 8 problems
Interviewed by Paytm (One97 Communications Limited)
522 views
0 comments
0 upvotes