data_struct algorithm codes by exercise