Percentages
A number is increased by 20% and then decreased by 20%. Net change?
Interview prep
Aptitude patterns and coding discussion prompts typical of NQT and service-company first rounds. Pair this with DSA practice three times a week.
A number is increased by 20% and then decreased by 20%. Net change?
A finishes in 10 days, B in 15. Together how many days?
2, 6, 12, 20, 30, ?
CP=500, SP=575. Profit %?
Father is 3 times son. In 12 years he will be twice. Son's present age?
P=1000, R=10%, T=2 years. SI?
A:B = 2:3, B:C = 4:5. A:C?
Avg of 5 numbers is 20. If one number 30 is replaced by 40, new avg?
Pipe A fills in 6h, B empties in 8h. Together fill time from empty?
A fair die. P(prime number)?
A is B's brother. C is A's mother. D is C's father. How is D related to B?
If CAT = 24, DOG = 26, what is BAT?
Write C++ logic to reverse digits of an integer without using strings. Discuss overflow.
Given a lowercase string, explain O(n) approach to print frequency of each character.
Optimize isPrime(n) better than checking all numbers till n-1. What is complexity?
Check if an integer is palindrome without converting to string. How?
Find second largest in array in one pass. Edge cases?
Are two strings anagrams? Give O(n) approach in C++.