Interview prep

TCS NQT

Aptitude patterns and coding discussion prompts typical of NQT and service-company first rounds. Pair this with DSA practice three times a week.

Aptitude

12

Percentages

A number is increased by 20% and then decreased by 20%. Net change?

Time & Work

A finishes in 10 days, B in 15. Together how many days?

Number series

2, 6, 12, 20, 30, ?

Profit & Loss

CP=500, SP=575. Profit %?

Ages

Father is 3 times son. In 12 years he will be twice. Son's present age?

Simple Interest

P=1000, R=10%, T=2 years. SI?

Ratio

A:B = 2:3, B:C = 4:5. A:C?

Average

Avg of 5 numbers is 20. If one number 30 is replaced by 40, new avg?

Pipes

Pipe A fills in 6h, B empties in 8h. Together fill time from empty?

Probability

A fair die. P(prime number)?

Blood relations

A is B's brother. C is A's mother. D is C's father. How is D related to B?

Coding-decoding

If CAT = 24, DOG = 26, what is BAT?

Coding prompts

6

Reverse digits

Write C++ logic to reverse digits of an integer without using strings. Discuss overflow.

Frequency of characters

Given a lowercase string, explain O(n) approach to print frequency of each character.

Prime check

Optimize isPrime(n) better than checking all numbers till n-1. What is complexity?

Palindrome number

Check if an integer is palindrome without converting to string. How?

Second largest

Find second largest in array in one pass. Edge cases?

Anagram check

Are two strings anagrams? Give O(n) approach in C++.