Hexaware Technologies interview question

general questions from pseudocode and apti