First question: given a 3x3 grid with stones placed on it — some cells may have more than one stone, and some cells may be empty — move stones between adjacent cells so that every cell ends up with exactly one stone. Find the minimum number of moves needed. This corresponds to LeetCode 2850, Minimum Moves to Spread Stones Over Grid.
Second question: given a set of 2D coordinate points (x, y) and a rectangle's perimeter P, place an axis-aligned rectangle on the coordinate plane, with its perimeter constrained by P, so that it contains as many of the given points as possible. Find the maximum number of points the rectangle can cover.
Third question: a pizza ordering system simulation. You need to implement 4 different discount schemes. You have to use structs or classes to define the pizza object and implement the actual discount calculation logic. The algorithm logic itself isn't that hard, but the implementation is pretty tedious and needs a well-structured design to keep it manageable.
Discussion
Loading comments…