basicalgos sort structure