Code exercise for Interview