Java - coding challenge for Sapient Global Markets