Four ways to find the second highest salary in SQL (MAX subquery, DENSE_RANK, LIMIT/OFFSET and TOP), how to handle ties and missing rows, and how to get the Nth highest.
Interview Insights and Technical Explorations
Four ways to find the second highest salary in SQL (MAX subquery, DENSE_RANK, LIMIT/OFFSET and TOP), how to handle ties and missing rows, and how to get the Nth highest.
How Java’s HashMap stores entries in buckets, how hashing, equals and hashCode, collisions and resizing work, and the Java 8 change to tree bins.
Check whether a number is prime in Java: the simple version, the square-root version, skipping even numbers, the 6k ± 1 trick, and the Sieve of Eratosthenes for many numbers.
How to answer the managerial round question about being put on a technology you have never used: a step-by-step plan and a sample STAR answer.
How to answer “Why do you want to join TCS?” in an interview, with a structure, sample answers for freshers and experienced candidates, and the mistakes to avoid.