
Learn core concepts, essential formulas, and attempt practice questions designed on the latest TCS NQT testing patterns.
What is outcome of: x & (x-1) for a positive integer x?
Correct Answer: A) Clears the lowest set bit of x
Step-by-step Solution: Subtracting 1 flips all bits after the lowest set bit. Bitwise ANDing this with x sets the lowest set bit of x to 0.
What is time complexity of finding prime numbers up to N using Sieve of Eratosthenes?
Correct Answer: A) O(N log log N)
Step-by-step Solution: Sieve of Eratosthenes is highly optimized, running in O(N log log N) time complexity.
Advanced coding tracks on TCS Prime require clean implementation under tight time bounds. Practice Sieve and Kadane's templates.