Question 1 :
Question 2:
Answer :
Question 2: variation of https://leetcode.com/problems/robot-bounded-in-circle/ problem on leetcode.