Code for technical interview