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

Trainee Technology

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

Interview preparation journey

expand-icon
Preparation
Duration: 6 Months
Topics: Data Structures and Algorithms, OOPS, Operating Systems, DBMS, Computer Network
Tip
Tip

Tip 1 : For DS and Algo, keep practicing every day on Leetcode, HackerEarth, and make a habit of participating in contests.
Tip 2 : Projects are vital in interviews, have at least 3 projects on Resume, in the field/profile which you're applying for.
Tip 3 : Give Mock Interviews.

Application process
Where: Campus
Eligibility: Above 60% in B.Tech, B.Tech in CSE/ECE/IT
Resume Tip
Resume tip

Tip 1 : Resume should be short and keep it under 1 page.
Tip 2 : Include skills that you're 100% confident in.
Tip 3 : Highlight your internships and projects section appropriately

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date15 Sep 2020
Coding problem0

This was an Aptitude/Technical test of 1 hour where there were 2 sections
1. Aptitude (Quantitative and Logical)
2. Technical (DS/Algo, and Programming Output Questions)
Timing: Morning
Environment: Online

02
Round
Easy
Online Coding Test
Duration90 minutes
Interview date16 Sep 2020
Coding problem3

Timing: Morning (10 AM)
Environment: Online (Proctored)
Coding Round (3 Questions)

1. Find Nth Prime

Moderate
15m average time
85% success
0/80
Asked in companies
OlaLivekeeping (An IndiaMART Company)UST Global

You are given a number 'N'. Your task is to find Nth prime number.

A prime number is a number greater than 1 that is not a product of two smaller natural numbers. Prime numbers have only two factors – 1 and the number itself.

Any number greater than 0 is a natural number i.e. natural numbers N = {1, 2, 3, 4,....}

For example:-

If you are asked to find the 7th prime number, it’ll be 17 because the first 7 prime numbers are 2, 3, 5, 7, 11, 13, 17.

Note: 1 is not a prime number.

Follow Up:
Try to solve the problem in O(N log log N) + O(N).
Problem approach

Step 1  I opted for the Sieve of Eratosthenes approach.
Step 2  Store all prime numbers in a vector and return (n-1)th for Nth Prime Number.

Try solving now

2. Check whether second string can be formed from characters of first string

Easy
10m average time
90% success
0/40
Asked in companies
AmazonNagarro Software

You are given two strings STR1 and STR2. You need to check whether STR2 can be formed from the characters of STR1. Both the strings can contain any characters.

For example:
If STR1 = “codingninjas” and STR2 = “sing”. We can form the second string using the characters of the first string. This is because “s”, “i”, “n”, “g” are present in the string STR1.
Problem approach

Step 1  The idea was to count frequencies of string 1 and deduct from frequencies of string 2 simultaneously.
Step 2  If frequency at any stage becomes negative, false should be returned.

Try solving now

3. Count derangements

Moderate
35m average time
60% success
0/80
Asked in companies
Info Edge India (Naukri.com)OLX GroupAmazon

A Derangement is a permutation of ‘N’ elements, such that no element appears in its original position. For example, an instance of derangement of {0, 1, 2, 3} is {2, 3, 1, 0}, because 2 present at index 0 is not at its initial position which is 2 and similarly for other elements of the sequence.

Given a number ‘N’, find the total number of derangements possible of a set of 'N’ elements.

Note:
The answer could be very large, output answer %(10 ^ 9 + 7).
Problem approach

Step 1  I followed the recursive approach initially, even though it passed all the cases.
Step 2  I still had time so changed it to DP, which reduced my time.

Try solving now
03
Round
Medium
Video Call
Duration40 minutes
Interview date1 Oct 2020
Coding problem3

Timing: 10:00 AM
Environment: Online (Webcam + Mic on)
The interviewer was friendly and to the point.

1. Detect and Remove Loop

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

Given a singly linked list, you have to detect the loop and remove the loop from the linked list, if present. You have to make changes in the given linked list itself and return the updated linked list.

Expected Complexity: Try doing it in O(n) time complexity and O(1) space complexity. Here, n is the number of nodes in the linked list.

Problem approach

Step 1: I went for the Hashing technique, which was more of a brute force approach.
Step 2: So, I went for a more optimized approach of Floyd’s Cycle-Finding Algorithm, which is 0(n) in Time and 0(1) in space. The interviewer was satisfied.

Try solving now

2. Spiral Order Traversal of a Binary Tree

Easy
20m average time
75% success
0/40
Asked in companies
SliceOYOMicrosoft

You have been given a binary tree of 'N' nodes. Print the Spiral Order traversal of this binary tree.

For example
For the given binary tree [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
    1
   / \
  2   3
     / \
    4   5

Output: 1 3 2 4 5
Try solving now

3. Trapping Rainwater

Moderate
15m average time
80% success
0/80
Asked in companies
RazorpayMorgan StanleyUber

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

Step 1  I preferred initially to traverse each array element and find the highest bars.
Step 2  To improve on the previous solution, instead of array traversal, I pre-computed the heights of the highest bars on left and right.

Try solving now
04
Round
Easy
HR Round
Duration20 minutes
Interview date1 Oct 2020
Coding problem3

Timing (In Evening)
Environment (Same as Technical Interview)

1. What are your Strengths and Weakness?

Problem approach

Tip 1: Be confident
Tip 2: Look at them with a straight back
Tip 3: Be honest and highlight your strengths.

2. Where do you see yourself in 5 years?

Problem approach

Tip 1 : Don't say things like the CEO of the company or where you're sitting.
Tip 2 : Try to read different answers and be confident.

3. Questions about the company.

Problem approach

Tip 1 : Before any interview have knowledge of what the company does.
Tip 2 : How it has performed over the years, what are its focus in business?

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
Trainee Technology
4 rounds | 7 problems
Interviewed by Nagarro Software
959 views
0 comments
0 upvotes
company logo
Trainee Technology
3 rounds | 5 problems
Interviewed by Nagarro Software
1147 views
0 comments
0 upvotes
company logo
Trainee Technology
3 rounds | 4 problems
Interviewed by Nagarro Software
2315 views
0 comments
0 upvotes
company logo
Trainee Technology
3 rounds | 6 problems
Interviewed by Nagarro Software
3236 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Trainee Technology
2 rounds | 4 problems
Interviewed by HCL Technologies
4853 views
0 comments
0 upvotes