Check whether two strings are anagrams with a 26-count array in O(n), the sorting approach, a HashMap for Unicode, and how to ignore spaces and case.
Interview Insights and Technical Explorations
Check whether two strings are anagrams with a 26-count array in O(n), the sorting approach, a HashMap for Unicode, and how to ignore spaces and case.
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.