TCS Coding Interview Questions: 118 Tagged Problems
118 coding problems tagged TCS — 111 easy · 7 medium — with solutions in 13 languages. Plus a 4-week study plan by topic.
- Problems: 118
- By difficulty: 111 easy · 7 medium
- Languages: JavaScript, TypeScript, Python, Java, C++, C, C#, Go, Kotlin, Swift, Rust, PHP and Ruby
- Cost: Free on every plan; sign in to run and submit
118 problems the CodeKairo catalogue tags as commonly asked in TCS's coding rounds — 111 easy and 7 medium, no hard ones — each judged by hidden tests in 13 languages. The most common topics among them are Arrays (63), Math (37) and Strings (34). CodeKairo's TCS NQT — Foundation mock covers the Foundation section of the TCS National Qualifier Test (NQT), the aptitude gate that every candidate has to clear before any track opens. The tag is the catalogue's own annotation of where a problem tends to come up — not a list published by TCS, which CodeKairo is not affiliated with.
TCS study plan by topic
40 of the 118 problems tagged TCS over 4 weeks, about 13 h 50 min of solving, grouped by technique in the order they build on each other — Arrays, Strings, Hash Table and Counting and 13 more. It ends with the TCS NQT — Foundation mock.
Week 1: Arrays, Strings, Hash Table
9 problems on Arrays, Strings and Hash Table, easiest first within each topic.
- Max Consecutive Ones Easy
- Three Consecutive Odds Easy
- Length of Last Word Easy
- To Lower Case Easy
- Remove Vowels from a String Easy
- Thousand Separator Easy
- Score of a String Easy
- Check if the Sentence Is Pangram Easy
- Unique Number of Occurrences Easy
Week 2: Counting, Math
9 problems on Counting and Math, easiest first within each topic.
- Count Elements With Maximum Frequency Easy
- Maximum Number of Pairs in Array Easy
- Find Words That Can Be Formed by Characters Easy
- Check if All Characters Have Equal Number of Occurrences Easy
- Plus One Easy
- Armstrong Number Easy
- Strong Number Easy
- Automorphic Number Easy
- Reverse Integer Medium
Week 3: Two Pointers, Sliding Window, Prefix Sum +3
11 problems on Two Pointers, Sliding Window, Prefix Sum, Sorting, Binary Search and Matrix, easiest first within each topic.
- Reverse String Easy
- Remove Element Easy
- Union of Two Sorted Arrays Easy
- Minimum Number of Platforms Medium
- Chocolate Distribution Problem Easy
- Find Pivot Index Easy
- Equilibrium Point Easy
- Wave Array Easy
- Sort the People Easy
- Find Transition Point Easy
- Find Missing and Repeated Values Easy
Week 4: Simulation, Enumeration, Greedy +3
11 problems on Simulation, Enumeration, Greedy, Recursion, Bit Manipulation and Number Theory, easiest first within each topic.
- Concatenation of Array Easy
- Count of Matches in Tournament Easy
- Count Integers With Even Digit Sum Easy
- Count Square Sum Triples Easy
- Maximum Sum With Exactly K Elements Easy
- Fibonacci Number Easy
- Divide Array Into Equal Pairs Easy
- Rings and Rods Easy
- Prime Factorisation Easy
- Find Greatest Common Divisor of Array Easy
- Three Divisors Easy
Finally: the timed test
Sit the TCS NQT — Foundation mock under the clock — the coding problems are only one part of the round.
TCS test patterns
- TCS NQT — Foundation pattern guide and timed mock
- TCS NQT — Foundation + Advanced pattern guide and timed mock
- TCS NQT — Advanced Coding pattern guide and timed mock
All problems tagged TCS
Easy (111)
- Calculate Delayed Arrival Time Math
- Rearrange Characters to Make Target String Hash Table, String, Counting
- Strong Password Checker II String
- Find the Encrypted String String, Simulation
- Find the Power of K-Size Subarrays I Array, Sliding Window
- Check if Array is Good Array, Hash Table, Sorting
- Split the Array Array, Hash Table, Counting
- Take Gifts From the Richest Pile Array, Heap, Simulation
- Find Smallest Letter Greater Than Target Array, Binary Search
- Maximum Sum Subarray of Size K Array, Sliding Window
- Find Indices With Index and Value Difference I Array, Two Pointers
- Pair With Given Difference Array, Two Pointers, Sorting
- Count Number of Pairs With Absolute Difference K Array, Hash Table, Counting
- Shortest Distance to Target String in a Circular Array Array, String, Two Pointers
- Intersection of Multiple Arrays Array, Hash Table, Counting
- Find the Distance Value Between Two Arrays Array, Two Pointers, Binary Search
- Merge Two 2D Arrays by Summing Values Array, Two Pointers
- Smallest Number With All Set Bits Bit Manipulation, Math
- Complement of Base 10 Integer Bit Manipulation, Math
- Find the K-or of an Array Bit Manipulation, Array
- Count Total Number of Colored Cells Math, Simulation
- Find the Maximum Divisibility Score Array, Math, Counting
- Check if Number Has Equal Digit Count and Digit Value Hash Table, String, Counting
- Construct the Rectangle Math, Number Theory
- Sum of Squares of Special Elements Array, Math, Number Theory
- Count Distinct Numbers on Board Math, Simulation, Number Theory
- Sum Multiples Math, Number Theory
- Split With Minimum Sum Math, Greedy, Sorting
- Number of Even and Odd Bits Bit Manipulation, Math
- Find the Pivot Integer Math, Prefix Sum
- Number of Distinct Averages Array, Hash Table, Two Pointers
- Check if The Number is Fascinating Math, Hash Table, String
- Number of Lines To Write String Array, String, Simulation
- Counting Elements Hash Table, Array, Counting
- Largest Unique Number Hash Table, Array, Sorting
- Divide a String Into Groups of Size k String, Simulation
- Rings and Rods Hash Table, String, Bit Manipulation
- Check if All Characters Have Equal Number of Occurrences Hash Table, String, Counting
- Maximum Number of Words Found in Sentences String, Array
- Find Words That Can Be Formed by Characters Hash Table, String, Counting
- Count the Number of Vowel Strings in Range String, Array
- Check if Binary String Has at Most One Segment of Ones String
- Minimum Changes to Make Alternating Binary String String, Greedy
- Check If String Is a Prefix of Array String, Array
- Student Attendance Record I String
- Reverse String II String, Two Pointers
- Largest Substring Between Two Equal Characters String, Hash Table
- Minimum Number Game Array, Sorting, Simulation
- Count Pairs With Given Sum Array, Hash Table
- Maximum Difference Between Adjacent Elements in a Circular Array Array
- Sort the People Array, Sorting, Hash Table
- Left Rotate an Array by D Places Array, Two Pointers
- Find Missing and Repeated Values Matrix, Hash Table, Math
- Find Transition Point Array, Binary Search
- Wave Array Array, Sorting
- Maximum Sum With Exactly K Elements Array, Greedy
- Find the Array Concatenation Value Array, Two Pointers, Simulation
- Find the Peaks Array, Enumeration
- The Two Sneaky Numbers of Digitville Array, Hash Table
- Maximum Number of Pairs in Array Array, Hash Table, Counting
- Count Elements With Maximum Frequency Array, Hash Table, Counting
- Unique Number of Occurrences Array, Hash Table
- Count the Digits That Divide a Number Math
- Smallest Even Multiple Math, Number Theory
- Remove Trailing Zeros From a String String
- Points That Intersect With Cars Array, Prefix Sum
- Ant on the Boundary Array, Prefix Sum, Simulation
- Find the Maximum Achievable Number Math
- Divisible and Non-Divisible Sums Difference Math
- Number of Employees Who Met the Target Array
- Count Square Sum Triples Math, Enumeration
- Count Integers With Even Digit Sum Math, Simulation
- Three Divisors Math, Number Theory
- Count of Matches in Tournament Math, Simulation
- Maximum Value of a String in an Array Array, String
- Percentage of Letter in String String
- Find First Palindromic String in the Array Array, String, Two Pointers
- Check if All A's Appears Before All B's String
- Score of a String String
- Check If Word Equals Summation of Two Words String, Math
- Thousand Separator String
- Remove Vowels from a String String
- To Lower Case String
- Union of Two Sorted Arrays Array, Two Pointers
- Chocolate Distribution Problem Array, Sorting, Sliding Window
- Divide Array Into Equal Pairs Array, Hash Table, Bit Manipulation
- Sign of the Product of an Array Array, Math
- Number of Students Doing Homework at a Given Time Array
- Equilibrium Point Array, Prefix Sum
- Leaders in an Array Array
- Second Largest Element Array
- Pascal's Triangle II Array, Dynamic Programming
- Three Consecutive Odds Array
- Remove Element Array, Two Pointers
- Check if the Sentence Is Pangram Hash Table, String
- Length of Last Word String
- Max Consecutive Ones Array
- Concatenation of Array Array, Simulation
- Find Pivot Index Array, Prefix Sum
- Find Numbers with Even Number of Digits Array, Math
- Find Greatest Common Divisor of Array Array, Math, Number Theory
- Prime Factorisation Math, Number Theory
- Perfect Number Math
- Harshad Number Math
- Neon Number Math
- Automorphic Number Math, String
- Strong Number Math
- Armstrong Number Math
- Fibonacci Number Math, Dynamic Programming, Recursion
- Plus One Array, Math
- Reverse String Two Pointers, String
Medium (7)
- Delete Characters to Make Fancy String String, Greedy
- Convert an Array Into a 2D Array With Conditions Array, Matrix, Hash Table
- Difference Between Ones and Zeros in Row and Column Array, Matrix, Simulation
- The k Strongest Values in an Array Array, Two Pointers, Sorting
- The kth Factor of n Math, Number Theory
- Minimum Number of Platforms Array, Greedy, Sorting
- Reverse Integer Math
Topics TCS asks most
- Arrays 63 problems
- Math 37 problems
- Strings 34 problems
- Hash Table 24 problems
- Two Pointers 15 problems
- Simulation 13 problems
- Counting 11 problems
- Sorting 11 problems
- Number Theory 9 problems
- Greedy 6 problems
- Bit Manipulation 6 problems
- Prefix Sum 5 problems