common algorithm and data structure