Code for Interview questions from various resources