Suppose you have parents and children
- come up with a data structre which represents their relactionship
- Given a pair - find if they are related or not.
Extend the above sineario if you have grandchildren also
Given a stream of integers and target. find all the two pair of numbers which equals target.
Derive an data strcuture which does get(int key), put(int key, int val) and setAll(int val) in constact time-o(1)
setAll(int val) - overrides all the exciting key values to val.