Add office photos
Nagarro logo
Engaged Employer

Nagarro

Verified
4.0
based on 4.1k Reviews
Video summary
Filter interviews by
Trainee
Clear (1)

Nagarro Trainee Interview Questions and Answers

Updated 17 Jul 2024

Q1. How can you check whether the give string can become palindrome or not. You can apply unlimited operations.

Ans.

To check if a string can become a palindrome, count the frequency of each character. If there is at most one character with an odd frequency, it can be rearranged into a palindrome.

  • Count the frequency of each character in the string

  • Check if there is at most one character with an odd frequency

  • If yes, the string can be rearranged into a palindrome

Add your answer
right arrow

Q2. Given an array find if there are two elements are present that sum to target, else return -1;

Ans.

Given an array find if there are two elements are present that sum to target, else return -1

  • Iterate through the array and for each element check if target - element is present in the array

  • Use a hash table to store the elements and their indices for faster lookup

  • If no such pair is found, return -1

Add your answer
right arrow

Q3. In what cases quick sort has worst case time complexity

Ans.

Quick sort has worst case time complexity when the pivot element is either the smallest or largest element in the array.

  • Pivot element is the smallest or largest element in the array

  • Array is already sorted in ascending or descending order

  • Pivot selection strategy is not efficient

Add your answer
right arrow

Q4. How can you find middle element of linkedList in O(n)

Ans.

Use two pointers, one moving twice as fast as the other, to find the middle element of a linked list in O(n) time complexity.

  • Initialize two pointers, slow and fast, at the head of the linked list.

  • Move the slow pointer one step at a time and the fast pointer two steps at a time.

  • When the fast pointer reaches the end of the list, the slow pointer will be at the middle element.

Add your answer
right arrow
Discover Nagarro interview dos and don'ts from real experiences

Q5. Real life usage of data strctures.

Ans.

Data structures are used in real life for organizing and managing data efficiently.

  • Storing and retrieving contact information in a phone book using a hash table

  • Organizing and searching for books in a library using a binary search tree

  • Managing a playlist of songs using a linked list

Add your answer
right arrow

Q6. Reverse the linkedlist

Ans.

Reverse a linked list

  • Iterate through the linked list and change the direction of the pointers

  • Use three pointers to keep track of the current, previous and next nodes

  • Recursively reverse the linked list

Add your answer
right arrow

More about working at Nagarro

Back
Awards Leaf
AmbitionBox Logo
#2 Best Large Company - 2022
Awards Leaf
Awards Leaf
AmbitionBox Logo
#1 Best IT/ITES Company - 2022
Awards Leaf
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Nagarro Trainee

based on 10 interviews
5 Interview rounds
Resume Shortlist Round
Aptitude Test Round
Coding Test Round
Technical Round
HR Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Trainee Interview Questions from Similar Companies

Wipro Logo
3.7
 • 21 Interview Questions
TCS Logo
3.7
 • 19 Interview Questions
Cognizant Logo
3.7
 • 12 Interview Questions
Episource Logo
3.9
 • 10 Interview Questions
Tata Motors Logo
4.2
 • 10 Interview Questions
View all
Recently Viewed
LIST OF COMPANIES
IDZ Digital
Overview
SALARIES
Tencent
76 salaries
LIST OF COMPANIES
Tencent
Overview
LIST OF COMPANIES
Merkur Gaming India
Overview
SALARIES
Nagarro
INTERVIEWS
Pole To Win
No Interviews
INTERVIEWS
Pole To Win
No Interviews
SALARIES
Hewlett Packard Enterprise
SALARIES
Scooters India
INTERVIEWS
NTT
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter