Thales
NIIT Interview Questions and Answers
Q1. Reverse a String Problem Statement
Given a string STR
containing characters from [a-z], [A-Z], [0-9], and special characters, determine the reverse of the string.
Input:
The input starts with a single integer '...read more
Q2. Duplicate Characters in a String
Given a string 'S' of length 'N', identify and return all the characters in the string that appear more than once along with their frequency.
Example:
Input:
N = 5
S = 'GEEK'
O...read more
Q5. 2. reverse a string, find a duplicate in a string.
Reverse a string and find a duplicate in an array of strings.
To reverse a string, we can use the built-in reverse() method or loop through the string and append each character to a new string in reverse order.
To find a duplicate in an array of strings, we can use a hash table to keep track of the frequency of each string and return the first string with a frequency greater than 1.
Q6. Sorting Algorithm
Sorting algorithm is a method of arranging elements in a specific order.
Common sorting algorithms include bubble sort, insertion sort, selection sort, merge sort, quick sort, and heap sort.
The choice of sorting algorithm depends on the size of the data set, the data type, and the desired time complexity.
Sorting algorithms can be implemented in various programming languages such as Java, Python, and C++.
Interview Process at NIIT
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month