Code I wrote for an interview at Jugnoo