Data structure and algorithm