algorithm study test codes