Now practice all your interviews before giving the real one
( TCS interview questions )
15 questions candidates report from TCS interviews, grouped by topic, with a short note on how to answer each kind. Then say your answers out loud in a practice interview.
5 minutes, no CV needed. A practice round, not TCS's own.
Our bank holds 151 coding questions that candidates report from TCS interviews. The topics that come up most: arrays & hashing (41), math & bits (23), two pointers (12) and binary search (11). Of the 151 coding questions, 56 are easy, 83 medium and 12 hard.
Our data covers coding questions for TCS; it says nothing about their other rounds, so we don't guess. These are practice questions based on what candidates report on public, community-kept lists, each written in our own words. RoundAlpha is not linked to TCS.
( Questions )
Two SumEasy
Given an array of integers nums and an integer target, return the positions of the two numbers that add up to target.
Longest Leading MatchEasy
Given an array of strings strs, return the longest sequence of leading characters that appears at the beginning of every string.
First Substring MatchEasy
Given the strings haystack and needle, return the zero-based index of the earliest position where needle occurs as a contiguous substring of haystack.
Longest Palindrome InsideMedium
You are given a string s. Return the longest piece of it — a run of letters that sit next to each other in s — that reads the same forwards and backwards (a palindrome).
Best Slice SumMedium
You are given a list of whole numbers, nums, some of which may be negative. A slice is a run of one or more numbers that sit next to each other in the list.
Check Digit SymmetryEasy
Given an integer x, return true if its digits read identically from left to right and from right to left, and false otherwise.
Rebuilding a Number BackwardMedium
Implement reverse(x: int) -> int for a signed 32-bit integer x. Return the integer obtained by taking x's decimal digits from right to left, preserving its sign.
The Single OneEasy
Every number in nums appears exactly twice, except for one number that appears only once.
Longest Unique StretchMedium
Given a string s, return the length of the longest stretch of consecutive characters in which no character appears twice.
Best Day to SellEasy
prices[i] is the price of one share on day i. You may buy one share on one day and sell it on a later day.
Biggest Water TankMedium
A row of walls stands on flat ground, one metre apart; height[i] is the height of wall i.
Three That Sum to ZeroMedium
Given a list of integers nums, return every triple of values, taken from three different positions, that adds up to 0.
Sort Three ColoursMedium
The list nums holds only the values 0, 1 and 2 — think of them as red, white and blue. Rearrange nums in place so that every 0 comes first, then every 1, then every 2.
Balanced BracketsEasy
A string s is made only of the characters ( ) [ ] { }. Return true if every opening bracket is closed by a bracket of the same kind, and the brackets close in the right order.
Jump GameMedium
You stand on the first square of a row of squares.
Want to write the code too? The TCS list on our coding practice page runs your answer against hidden tests, in six languages.
Questions
Our bank holds 151 coding questions that candidates report from TCS interviews. The topics that come up most: arrays & hashing (41), math & bits (23), two pointers (12) and binary search (11). This page shows 15 of them, grouped by topic.
Of the 151 coding questions, 56 are easy, 83 medium and 12 hard. The level you meet depends on the role and your experience, so practise easy and medium ones until you can explain them out loud, then add hard ones.
They are practice questions based on what candidates report from TCS interviews on public, community-kept lists. Each one is written in our own words. RoundAlpha is not linked to TCS, and no list can promise what a given interviewer will ask.
Yes. A new account you sign up for yourself gets one short free practice interview. Name TCS as the company and the interviewer leans its questions toward that company. You can choose "No CV this time", so no CV is needed. You talk out loud and get a scored report at the end.
Read next
Ready when you are
A short practice interview with TCS named as the company, then a scored report on every answer.
5 minutes, no CV needed. A practice round, not TCS's own.