Northrop Grumman interview question

coding question piece of paper