Add office photos
Employer?
Claim Account for FREE

Thales

3.6
based on 378 Reviews
Filter interviews by

Annai Arul Public School Interview Questions and Answers

Updated 5 Feb 2024

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
Ans.

Reverse a given string containing characters from [a-z], [A-Z], [0-9], and special characters.

  • Iterate through the characters of the string from end to start and append them to a new string to get the reversed string.

  • Use built-in functions like reverse() or StringBuilder in languages like Java for efficient reversal.

  • Handle special characters and numbers along with alphabets while reversing the string.

  • Ensure to print each reversed string on a separate line as per the output for...read more

Add your answer

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
Ans.

Identify and return all characters in a string that appear more than once along with their frequency.

  • Iterate through the string and count the frequency of each character using a hashmap.

  • Return characters with frequency greater than 1 in an array of tuples.

Add your answer
Q3. What is the cut command in Linux and how do you use it?
Ans.

The cut command in Linux is used to extract sections from each line of input.

  • Used to cut out specific sections of text from a file or input stream

  • Can specify the delimiter used to separate fields

  • Options include -c for characters, -f for fields, and -d to specify the delimiter

  • Example: cut -d',' -f1,3 file.txt

Add your answer
Q4. What is the Find command in Linux and how is it used?
Ans.

The Find command in Linux is used to search for files and directories based on specified criteria.

  • Used to search for files and directories in a specified directory

  • Criteria can include file name, size, permissions, and more

  • Can be combined with other commands like -exec to perform actions on found files

Add your answer
Discover Annai Arul Public School interview dos and don'ts from real experiences

Q5. 2. reverse a string, find a duplicate in a string.

Ans.

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.

Add your answer

Q6. Sorting Algorithm

Ans.

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++.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Annai Arul Public School

based on 2 interviews
1 Interview rounds
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

4.9
 • 23 Interview Questions
3.6
 • 22 Interview Questions
4.3
 • 21 Interview Questions
3.2
 • 12 Interview Questions
3.5
 • 10 Interview Questions
3.9
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
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