TCS NQT Coding Sheet – TCS Coding Questions

TCS NQT Coding Questions
TCS NQT Coding Sheet – TCS Coding Questions

This post contains all popular and most frequents coding questions asked in the TCS NQT test and other similar tests. The title “TCS NQT Coding Sheet – TCS Coding Questions” is exactly what it suggests. The list contains detailed tutorials for Top 100 TCS NQT Coding Questions. Complete these 100 coding questions to crack the TCS NQT Coding section.

Tip: It is believed that TCS gives additional weightage to people who solves maximum number coding questions in campus hirings. However, there is no concrete evidence to back this statement.


TCS NQT is an exam conducted by TCS(Tata Consultancy Services) to hire for the role of TCS Ninja and TCS Digital. All the interested students can find the detailed TCS NQT Syllabus and Exam pattern in this article. Nearly 1 million (10 Lakh+) candidates appears in the TCS NQT test every year.

Check Detailed TCS NQT Syllabus 2022 Here

Tip: All of the below links contains detailed tutorials to each and every coding problem, we recommend solving these questions on your own before jumping to the solutions.

Problems on Arrays

  1. Find the smallest number in an array
  2. Find the largest number in an array
  3. 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 unsorted array
  13. Adding Element in 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 array
  17. Maximum product subarray in an array
  18. Replace each element of the array by its rank in the array
  19. Sorting elements of an array by frequency
  20. Rotation of elements of array- left and right
  21. Finding equilibrium index of an array
  22. Finding 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 Array is a subset of another array or not

Problems on Numbers

  1. Check if a number is palindrome or not
  2. Find all Palindrome numbers in a given range
  3. Check if a number is prime or not
  4. Prime numbers in a given range
  5. Check if a number is armstrong number of not
  6. Check if a number is perfect number
  7. Even or Odd
  8. Check weather a given number is positive or negative
  9. Sum of first N natural numbers
  10. Find Sum of AP Series
  11. Program to find sum of GP Series
  12. Greatest of two numbers
  13. Greatest of three numbers
  14. Leap Year or not
  15. Reverse digits of a number
  16. Maximum and Minimum digit in a number
  17. Print Fibonacci upto Nth Term
  18. Factorial of a number
  19. Power of a number
  20. Factors of a given number
  21. Print all prime factors of the given number
  22. Check if a number is a strong number or not
  23. Check if a Number is Automorphic
  24. GCD of two numbers
  25. LCM of two numbers
  26. Check if a number is Harshad number
  27. Check if the number is abundant number or not
  28. Sum of digits of a number
  29. Sum of numbers in the given range
  30. Permutations in which N people can occupy R seats in a classroom
  31. Program to add two fractions
  32. Replace all 0s with 1s in a given integer
  33. Can a number be expressed as a sum of two prime numbers
  34. Calculate the area of circle
  35. Program to find roots of a Quadratic Equation

Problems on Number System

  1. Convert Binary to Decimal
  2. Convert binary to octal
  3. Decimal to Binary conversion
  4. Convert decimal to octal
  5. Convert octal to binary
  6. Convert octal to decimal
  7. Convert digits/numbers to words

Problems on Sorting

  1. Bubble Sort Algorithm
  2. Selection Sort Algorithm
  3. Insertion Sort Algorithm
  4. Quick Sort Algorithm
  5. Merge sort algorithm

Problems on String

  1. Check if a given string is palindrome or not
  2. Count number of vowels, consonants, spaces in String
  3. Find the ASCII value of a character
  4. Remove all vowels from the string
  5. Remove spaces from a string
  6. Remove characters from a string except alphabets
  7. Reverse a String
  8. Remove brackets from an algebraic expression
  9. Sum of the numbers in a String
  10. Capitalize first and last character of each word
  11. Calculate frequency of characters in a string
  12. Find Non-repeating characters of a String
  13. Check if two strings are anagram of each other
  14. Count common sub-sequence in two strings
  15. Check if two strings match where one string contains wildcard characters
  16. Return maximum occurring character in the input string
  17. Remove all duplicates from the input string.
  18. Print all the duplicates in the input string.
  19. Remove characters from first string present in the second string
  20. Change every letter with the next lexicographic alphabet in the given string
  21. Write a program to find the largest word in a given string.
  22. Write a program to sort characters in a string
  23. Count number of words in a given string
  24. Write a program to find a word in a given string which has the highest number of repeated letters
  25. Change case of each character in a string
  26. Concatenate one string to another
  27. Write a program to find a substring within a string. If found display its starting position
  28. Reverse words in a string

Please leave your suggestions/feedbacks in the comments below! 🙂

Also check out Striver SDE Sheet for product based company’s interviews.