basic data structure and algorithm implementing in python