Interview Prep #1 : Hashmaps
Data Structure Prep #1: Hashmap by Ashur Baroutta With internship and job interviews heavily reliant on testing proficiency in data structure and algorithm knowledge, I thought it wise to pursue learning more about some key concepts and solving more challenging problems. Hashmaps can be thought of as data structures that store key-value pairs, for every key there is a corresponding value. The reason they're important to know is due to their time and space complexity. Let's take a look at what that means in practice. Our problem, this is one of several potential problems commonly given in internship interviews for top tech companies, states "given an integer array "nums", return true if any value appears at least twice in the array, otherwise return false if every element is distinct. Simply put, we're to check if a given array has a duplicate. Many students, raises hand, try to brute force this problem with a...