LinkedIn interview question

Valid Perfect Square