# Nagarro Coding Questions

## Nagarro Coding Question with Solutions 2023

Nagarro Coding Questions and Answers most important Test Round. It is an elimination round and the student is given a leverage to choose any coding language in which he/she is comfortable with.

There is a Programming Test of 150 minutes which is necessary for a student to qualify to further sit in the virtual interview process for the position of Software Developer as well as Commando Software Developer.

Nagarro helps businesses, from early-stage startups to Global 50 industry leaders, achieve their strategic objectives by providing outsourced software development services.

Their main office is in Munich, Germany, and we also have subsidiaries there as well as in New York, Mexico, Frankfurt, and Stockholm.

### Nagarro Recruitment Process

The Nagarro Recruitment Process contains the following rounds.

• Aptitude test and technical objective test
• Programming Test
• Virtual Interview

NagarroRelated Information
Batch2023
CourseB.TECH CSE/ECE/IT, MCA, M.Tech (CSE)
Education
• Students expecting 60% till end of last semester may also
apply
• No backlogs
• 60 % in the current degree
Rounds
• Aptitude test and technical objective test of 60 minutes followed by a programming test of 150 minutes
• All rounds will be elimination rounds
Cost to Company (CTC)
• SD – 4.5
• CSD – 6 LPA
Training Period6 to 8 months
Salary / stipend paid during training
• SD Position role – 19,000/- PM stipend during training period
• CSD Position role – 25,000/-PM stipend during training period

### Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

## Sample Nagarro Coding Questions and Answers 2023

Problem statement : Aman, who is working at a software company forgot the password of his Linkedin id.But he knows the ASCII values of his password in reverse order. Help aman to find the password.
To decode the password, first reverse the string of digits, then successively pick valid values from the string and convert them to their ASCII equivalents. Some of the values will have two digits, and others three. Use the ranges of valid values when decoding the string of digits.

Some of the ASCII values are given with their characters:

•  The ASCII value of A to Z is 65 to 90.
•  The ASCII value of a to z is 97 to 122.
•  The ASCII value of space characters is 32.

Note: The password only has alphabets and blank spaces.

Given a string , decode the password by following the steps mentioned above.

#### Constraints:

• 1<= |s| <=10^5
• s[i] is an ascii character in the range [A-Za-z] or a space character

#### Sample Input:

• 796115110113721110141108

• PrepInsta

#### Explanation

• The reversed string will be 801141011127311011511697, which if analysed as ascii will be “PrepInsta”

### QUESTION 02 : Maximum Revenue

Problem statement : Amit is a salesman who wishes to know the maximum revenue received from a given item of the N products each day . Amit has a sales record of N products for M days.Helo amit to find the highest revenue received each day.

#### Input :

• The first line of the input consists of two space-separated integers- day(M) and item(N) representing the days and the products in the sales record.
• The next M lines consist of N space separated integers representing the sales revenue from each product each day.

#### Output:

• Print m space-separated integers representing the maximum revenue received each day .

#### Example Input:

• 3 4
• 101 123 234 344
• 143  282 499 493
• 283 493 202 304

• 344 499 493

#### Explanation:

• The maximum revenue received on the first day is 344 , followed by a maximum revenue of 499 on the second day and a maximum revenue of 493 on the third day.

### QUESTION 03 : Device Name System

Problem statement : Rocky is a software engineer and he is creating his own operating system called “myFirst os”. myFirst os  is a GUI (Graphical user interface) based operating system where everything is stored in files and folders. He is facing issues on  creating unique folder names for the operating system . Help rocky to create the unique folder name for it’s os.If folder name already exists in the system and integer number is added at the name to make it unique. The integer added starts with 1 and is incremented by 1 for each new request of an existing folder name. Given a list of folder names , process all requests and return an array of corresponding folder names.

#### Example

• n=5
• Foldername[0] = ‘home’ is unique.
• Foldername[1] = ‘myfirst’ is unique.
• Foldername[3] =’myfirst’ already exists in our system. So Add1 at the end of the folder name i.e foldername[3] =”myfirst1″
• Foldername[4 ]=’myfirst’ also already exists in our system.So add 2 at the end of the folder name i.e. foldername[4]=”myfirst2″.

#### Function description

• Complete the function folderNameSystem In the editor below
• folderNameSystem has the following parameters
• string foldername[n]: an array of folder name string in the order requested

#### Returns:

• String[n]:  an array of strings usernames in the order assigned

#### Constraints

•     1<=n<=10^4
•     1<=length of foldername[i]<20
•     foldername[i] contains only lowercase english letter in the range ascii[a-z]

#### Input Format:

• The first line contains an integer n , denoting the size of the array usernames Each line i of the n subsequent lines (where i<=0<=n) contains a string usernames[i] representing a username request in the order received.

• 4
• home
• first
• first

• home
• first
• first1

#### Explanation 0

•    foldername[0] = ‘home’ is unique
•    foldername[2]= ‘first’ is unique
•    foldername[3]=’first’ is already existing . so add 1 to it and it become first1

### Question 04 : Duplicates

Problem statement : The principal has a problem with repetitions. Everytime someone sends the same email twice he becomes angry and starts yelling. His personal assistant filters the mails so that all the unique mails are sent only once, and if there is someone sending the same mail again and again, he deletes them. Write a program which will see the list of roll numbers of the student and find how many emails are to be deleted.

6
1
3
3
4
3
3

3

### Question 05 : PrepInsta Name : Borrow Number

Problem statement : You have two numbers number1 and number2, your job is to check the number of borrow operations needed for subtraction of number1 from number2. If the subtraction is not possible
then return the string not possible.

• 754
• 658

• 2
• 654
• 666

## FAQs on Naarro Coding Questions with Solutions

##### Question 1: Question 1: What is the difficulty level of Coding in Nagarro?

The coding level of Nagarro is quite difficult, you will be evaluated on the basis of in-depth knowledge.

##### Question 2: Is Nagarro exam difficult to crack?

Nagarro exam is of Medium Difficulty. They put emphasis on analytical thinking and problem solving skills of the candidate.

## Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others