Add basic algorithm and data structure