my implementation of data structure and algorithm