Ad

Friday, December 8, 2017

Python Dictionary, hash map a very useful data structure in technical interviews

When brainstorming solutions in an interview, the first thought is to start with a brute force solution, then what? Gaye of Cracking the Coding Interview mentions that hash map should be the first data structure to think about. It is incredibly useful and versatile, retrieval is only O(1) and space is at most O(n) because there is no repeat in keys. 

No comments:

Post a Comment

Reinforcement Learning Q Learning

Explore <s, a> ---> s' reads: move from current state s to s' via action a.   Through the action a reward  is received, it ...