J.P. Morgan interview question

Valid Parenthesis, Happy numbers and basic language conceptual questions.