add algorithm and data-structure