Top 100 TCS NQT Coding Questions
Problems on Arrays:
1. Find the smallest number in an array
2. Find the largest number in an array
3. Find Second Smallest and Second Largest element in an array
4. Reverse a given array
5. Count frequency of each element in an array
6. Rearrange array in increasing-decreasing order
7. Calculate sum of the elements of the array
8. Rotate array by K elements - Block Swap Algorithm
9. Average of all elements in an array
10. Find the median of the given array
11. Remove duplicates from a sorted array
12. Remove duplicates from an unsorted array
13. Adding an element to an array
14. Find all repeating elements in an array
15. Find all non-repeating elements in an array
16. Find all symmetric pairs in an array
17. Find the maximum product subarray in an array
18. Replace each element by its rank in the array
19. Sort elements of an array by frequency
20. Rotate elements of the array left and right
21. Find the equilibrium index of an array
22. Perform circular rotation of an array by K positions
23. Sort an array according to the order defined by another array
24. Search an element in an array
25. Check if one array is a subset of another array
Problems on Numbers:
26. Check if a number is a palindrome
27. Find all palindrome numbers in a given range
28. Check if a number is prime
29. Find all prime numbers in a given range
30. Check if a number is an Armstrong number
31. Check if a number is a perfect number
32. Check if a number is even or odd
33. Check whether a given number is positive or negative
34. Find the sum of first N natural numbers
35. Find the sum of an AP series
36. Find the sum of a GP series
37. Find the greatest of two numbers
38. Find the greatest of three numbers
39. Check if a year is a leap year
40. Reverse the digits of a number
41. Find the maximum and minimum digit in a number
42. Print Fibonacci series up to Nth term
43. Find the factorial of a number
44. Find the power of a number
45. Find all factors of a given number
46. Print all prime factors of a number
47. Check if a number is a strong number
48. Check if a number is an automorphic number
49. Find the GCD of two numbers
50. Find the LCM of two numbers
51. Check if a number is a Harshad number
52. Check if a number is an abundant number
53. Find the sum of digits of a number
54. Find the sum of numbers in a given range
55. Find permutations in which N people can occupy R seats
56. Program to add two fractions
57. Replace all 0s with 1s in a given integer
58. Check if a number can be expressed as the sum of two prime numbers
59. Calculate the area of a circle
60. Find roots of a quadratic equation
Problems on Number System:
61. Convert binary to decimal
62. Convert binary to octal
63. Convert decimal to binary
64. Convert decimal to octal
65. Convert octal to binary
66. Convert octal to decimal
67. Convert digits or numbers to words
Problems on Sorting:
68. Bubble Sort Algorithm
69. Selection Sort Algorithm
70. Insertion Sort Algorithm
71. Quick Sort Algorithm
72. Merge Sort Algorithm
Problems on Strings:
73. Check if a string is a palindrome
74. Count vowels, consonants, and spaces in a string
75. Find ASCII value of a character
76. Remove all vowels from a string
77. Remove spaces from a string
78. Remove all characters except alphabets from a string
79. Reverse a string
80. Remove brackets from an algebraic expression
81. Sum of numbers present in a string
82. Capitalize the first and last character of each word
83. Find frequency of characters in a string
84. Find non-repeating characters in a string
85. Check if two strings are anagrams
86. Count common subsequences in two strings
87. Check if two strings match where one has wildcard characters
88. Find the maximum occurring character in a string
89. Remove all duplicates from a string
90. Print all duplicate characters in a string
91. Remove characters from the first string present in the second string
92. Change every letter to the next lexicographic alphabet
93. Find the largest word in a string
94. Sort characters of a string
95. Count number of words in a string
96. Find the word with the highest number of repeated letters
97. Change case of each character in a string
98. Concatenate one string to another
99. Find a substring within a string and display its starting position
100. Reverse the words in a string