practicing some common data structures and algorithms in python