algorithms questions