Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Nagaaro interview experience Real time questions & tips from candidates to crack your interview

Trainee Technology

Nagaaro
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2-3 months
Topics: Data Structures, OOPS, Algorithms, DBMS, Operating Systems
Tip
Tip

Tip 1 : Leave the subject but never leave the topic
Tip 2 : Have good hold on DSA
Tip 3 : Always go through the interview experiences of the company and common interview questions

Application process
Where: Campus
Eligibility: Btech- CSE, IT and ECE and MCA. 60% in the current degree with one pending backlog
Resume Tip
Resume tip

Tip 1 : Never add false things on your resume
Tip 2 : Add atleast 2 projects

Interview rounds

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

It was an Aptitude + Technical mcq round. It started at morning around 10:00 am and the test duration was of one hour.The questions were of moderate difficulty. Practice the dsa mcq from gfg . Most of them were previous year gate questions which you can find easily on internet.

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

It was an online coding round consisting of 3 questions conducted on Mettl platform. It started at 10:00 am and the test duration was of 90 mins. The questions were pretty easy of topics like arrays and strings.

1. Find Nth Prime

Moderate
15m average time
85% success
0/80
Asked in companies
OlaSiemensIndiaMart

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).
Problem approach

The logic is simple.

Step1 : First, you take input from the user asking the value of n.

Step2 : Then you run a loop finding all the prime numbers.

Step3 :  Whenever a prime number is found, the count is increased and if the count is equal to the input of user (i.e., if the prime number found is the nth prime number), then print it.

Try solving now

2. Count Palindrome Words in A String

Easy
15m average time
85% success
0/40
Asked in companies
GoogleCognizantMakeMyTrip

You are given a string S of words. Your task is to find the number of palindrome words in the given string S. A word is called palindrome, if it reads the same backwards as forwards.

Note:
Words are separated by one or more whitespace characters.
For Example:
For the given string “Madam oyo cat”, “Madam”, and “oyo” are the palindrome words 
Problem approach

1. We will take each word after a space “ “ in a sentence and pass it to a function.

2.The function transforms the characters of words in lowercase.

3. Now start traversing from the first character of the word and compare word[0] with word[length-1], word[1] with word[length-2] and so on.

4. If any mismatch occurs break loop else return true.

 

Try solving now

3. Distribute N candies among K people

Easy
15m average time
85% success
0/40
Asked in companies
OlaIntuitGeeksforGeeks

Sanyam has ‘N’ candies, he wants to distribute that into ‘K’ of his friends. He made his ‘K’ friends stand in line, in increasing order of his likeness. Not being so smart he gives 1 candy to the first friend, 2 to the second person, and so on till the kth person. In the next turn, the first person gets ‘K + 1’ candies, the second person gets ‘K + 2’ candies, and so on.

While distributing the candies, if at a turn, the number of candies to be given to a friend is less than the required candies, then that friend gets all the remaining candies and Sanyam stops the distribution.

Your task is to find the total number of candies every person has at the end.

Problem approach

I had done this question before.

Try solving now
03
Round
Easy
Face to Face
Duration20-30 minutes
Interview date30 Sep 2020
Coding problem2

Interview was scheduled for 11:00 am and took around 20 mins. It was conducted on MS teams. The interviewer was polite and frank.
After the introduction he asked me some questions related to OOPS such as:
1. What are the principles of OOPS
2. What do you mean by polymorphism?
3. What is function overloading?
4. What are abstract classes and interface.

Then he gave me one coding question to solve. He told me to write the code on notepad and share screen.
question asked: Reverse the stack using recursion.

I was not able to solve this problem hence he gave me another question:
question: Reverse the linkedlist without using any extra space.

1. Reverse Stack Using Recursion

Easy
21m average time
80% success
0/40
Asked in companies
AmazonOracleRazorpay

Reverse a given stack of 'N' integers using recursion. You are required to make changes in the input parameter itself.


Note: You are not allowed to use any extra space other than the internal stack space used due to recursion.


Example:
Input: [1,2,3,4,5] 
Output: [5,4,3,2,1]

add image

Problem approach

I was not able to solve this question

Try solving now

2. Reverse Linked List

Easy
15m average time
85% success
0/40
Asked in companies
AmazonSnapdealPaytm (One97 Communications Limited)


Example:

Input:
2 4 5 -1

Output:
5 4 2 -1

Explanation: 2->4->5 is the initial linked list. If we reverse this, we get 5->4->2.
Problem approach

Step1 : I tried to solve this problem by making a new linkedlist.

Step2 : Then I tried using stack.

Step3 : Interview told me to optimize the approach without using any extra space.

Step4 : I could not think of optimized solution

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 can be the possible extension for the HTML5 file?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
Trainee Technology
4 rounds | 9 problems
Interviewed by Nagaaro
1111 views
0 comments
0 upvotes
company logo
Trainee Technology
3 rounds | 5 problems
Interviewed by Nagaaro
821 views
0 comments
0 upvotes
company logo
Trainee Technology
3 rounds | 4 problems
Interviewed by Nagaaro
614 views
0 comments
0 upvotes
company logo
Trainee Technology
3 rounds | 6 problems
Interviewed by Nagaaro
846 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Trainee Technology
2 rounds | 4 problems
Interviewed by Tata Consultancy Services (TCS)
1167 views
0 comments
0 upvotes
company logo
Trainee Technology
2 rounds | 4 problems
Interviewed by HCL Technologies
4192 views
0 comments
0 upvotes