[Developer take home test] implementations for inteview problems