String reflection coding challenge in amazon