Skip to content
Programming

Arrays, Strings and Hashing

Account required to view full content

Arrays, strings, and hash maps are the three data structures you will touch in almost every coding round, and a hash map is the single most useful tool you can bring to one. Most “make this faster” follow-ups in a quant interview are really “replace this nested loop with a dictionary lookup.” This lesson covers how Python lists actually store data, why strings being immutable changes how you build them, and why a dict or set turns an $O(n)$ scan into an $O(1)$ lookup. Then it works four of our interview questions end to end: grouping anagrams, checking palindromes, counting zero-sum subarrays with prefix sums, and counting word frequencies.