Find the second largest element of an array in a single pass, handling duplicates, negative numbers and arrays with fewer than two distinct values.
Interview Insights and Technical Explorations
Find the second largest element of an array in a single pass, handling duplicates, negative numbers and arrays with fewer than two distinct values.
Reverse a string in Java without StringBuilder.reverse(): the two-pointer swap, building a new string, recursion, and the Unicode edge case interviewers like.
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.