Earlier quoted context omitted.
Our take-home obviously isn't a trade secret, so we have three trivial problems in ours: 1. Write code that takes in a rectangle, coordinate, and distance, and tells if that coordinate is within the distance of the rectangle. 2. Determine whether a string has permutations which are palindromes. (I'm of the opinion this one is too simple, but it's been fascinating seeing what mental gymnastics some developers will go…
> 1. Write code that takes in a rectangle, coordinate, and distance, and tells if that coordinate is within the distance of the rectangle. Distance from the center of the rectangle? Easy. From the closest corner? Easy. From the closest point on the rectangle? I'm not clear how to do this. And will the sides of the rectangle be parallel to the x and y axes?
It's easiest to think about an axis-aligned rectangle, and you can convert any problem to have an axis-aligned rectangle by rotating everything.