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

SDE - 1

Nagarro Software
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
When I joined college, I was unaware of this Data Structure and Algorithm, which made my journey to getting an internship way more complicated. From that point, I started doing questions on leetcode and code studio.
Application story
This company visited for the placement to my college i get to know about this company from my college placement cell.
Why selected/rejected for the role?
I was rejected because i was not able to provide a good approach to the DSA question which are being asked
Preparation
Duration: 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Practice from Leetcode, solve Leetcode medium level problems.
Tip 2 : Brush up computer fundamentals from subjects like OS, DBMS and CN.
Tip 3 : Have a good project or good internship experience and have in-depth knowledge regarding what you have done.

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

Tip 1 : Do not even mention topics you have no idea about
Tip 2 : you should have some projects on resume and you should be able to explain clearly why you have chosen the particular project, what does it do, its functionality, outcomes and everything about each of the projects.
Tip 3 : Tailor your resume according to the needs/the role you are applying for

Interview rounds

01
Round
Medium
Video Call
Duration60 minutes
Interview date2 Feb 2023
Coding problem2

1. Middle of Linked List

Easy
20m average time
80% success
0/40
Asked in companies
NoBrokerIBMHCL Technologies

Given a singly linked list of 'N' nodes. The objective is to determine the middle node of a singly linked list. However, if the list has an even number of nodes, we return the second middle node.

Note:
1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Problem approach

Given the head node of the singly linked list, return a pointer pointing to the middle of the linked list.
If there are an odd number of elements, return the middle element if there are even elements return the one which is farther from the head node.
For example, let the linked list be 1->2->3->4->null

Since the number of elements in this linked list is 4 so we have 2 middle elements, i.e. 2 and 3, but we return 3 as it is farther from the head node, i.e. 1.

Try solving now

2. Cousins of Given Node in Binary Tree

Moderate
10m average time
90% success
0/80
Asked in companies
SamsungIBMDunzo

Given a binary tree of N nodes and a node of this tree, you need to return a list containing the values of the cousins of the given node in the given binary tree sorted by non-decreasing order of their values.

Note:
Two nodes of a binary tree are cousins if they have the same depth or level, but have different parents.

No two nodes in the given binary tree will have the same data values.
Example :

Example Of Cousins

Problem approach

intially a solution that finds whether given nodes are cousins or not by performing three traversals of binary tree has been discussed. next after asking for any different or optimal way to solve the same question by interviewer,
the approach to solve the problem by performing level order traversal is discussed . The idea was to use a queue to perform level order traversal, in which each queue element is a pair of node and parent of that node. For each node visited in level order traversal, check if that node is either first given node or second given node. If any node is found store parent of that node. While performing level order traversal, one level is traversed at a time. If both nodes are found in given level, then their parent values are compared to check if they are siblings or not. If one node is found in given level and another is not found, then given nodes are not cousins.

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date2 Feb 2023
Coding problem2

1. Count of sum of consecutives

Hard
30m average time
70% success
0/120
Asked in companies
LinkedInVisaWalmart

You are given a positive integer 'N.' Your task is to find the number of ways to represent the given number 'N' as the sum of two or more consecutive natural numbers.

Problem approach

You are given the number ‘N’. The task is to find the number of ways to represent ‘N’ as a sum of two or more consecutive natural numbers.

Try solving now

2. The Celebrity Problem

Moderate
30m average time
60% success
0/80
Asked in companies
OlaVisaApple

There are ‘N’ people at a party. Each person has been assigned a unique id between 0 to 'N' - 1(both inclusive). A celebrity is a person who is known to everyone but does not know anyone at the party.

Given a helper function ‘knows(A, B)’, It will returns "true" if the person having id ‘A’ know the person having id ‘B’ in the party, "false" otherwise. Your task is to find out the celebrity at the party. Print the id of the celebrity, if there is no celebrity at the party then print -1.

Note:
1. The helper function ‘knows’ is already implemented for you.
2. ‘knows(A, B)’ returns "false", if A doesn't know B.
3. You should not implement helper function ‘knows’, or speculate about its implementation.
4. You should minimize the number of calls to function ‘knows(A, B)’.
5. There are at least 2 people at the party.
6. At most one celebrity will exist.
Problem approach

A celebrity is a person who is known to all but does not know anyone at a party. If you go to a party of N people, find if there is a celebrity in the party or not.
A square NxN matrix M[][] is used to represent people at the party such that if an element of row i and column j is set to 1 it means ith person knows jth person. Here M[i][i] will always be 0.

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

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by Nagarro Software
0 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Nagarro Software
906 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Nagarro Software
1196 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Nagarro Software
741 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes