What would you do if one of your employees came to you with a very personal problem that did not have anything to do with their job?
I would offer them an ear to vent to, be sympathetic and empathetic, and suggest that they seek assistance or advice from a professional, for example, any resources provided by the company to assist them in their life dilemma (HR Departments often offer "Help" resources), and ask them if they feel that this issue would impact their performance on the job if not taken care of. Personal problems are just that: Personal. And they MAY affect the workplace, peer relationships, etc, so I would refer them to professionals, and keep an eye out for any performance issues.
You are given two integers, p and q. Complete the function calculatePower which takes two integers as arguments and returns p to the power of q, without using the built-in power function. We expect you to do better than O(q). A same input is p = 2 and q = 3, and the corresponding output is 8. Constraints: 0 <= p^q <= ((2^63) - 1)
You are given a stream of directions in [up, down, left, right]. Each direction means move one unit in that direction. After completing the movements, you will return to the position where you started. Compute the area of the shape you created. I was asked this when FactSet interviewed me a very long time ago. I liked the question so I sometimes use it myself when I interview other applicants..