Playing around with various data structures and algorithm implementation