This is the code implementation for Microsoft interview 100 questions