miscellaneous (mostly basic) algorithm challenges