Read Next

Beat This Level, Get a Programming Job

Up for a fun challenge? Want a sweet job? If you can beat Gridmancer, our first developer challenge level, we'll help you find a programming job in the San Francisco Bay Area. This is a hard level, so if you can do it, you're probably qualified for some amazing opportunities.

In Gridmancer, you write an algorithm to cover the empty floor spaces in as few rectangles as possible. This is a real problem we had to solve in CodeCombat for both our pathfinding system and for our collision handling optimization system. Our implementation does it with 33 rectangles, but it's possible to do it with fewer--many of our playtesters actually beat our implementation, and a couple found the optimal solution of 29. (We're going to steal one of their algorithms to make CodeCombat itself faster.)

This level is a test of the CodeCombat coding challenge system. If you can beat Gridmancer in 40 rectangles or less, let us know--we'll personally talk to Silicon Valley tech companies on your behalf to try to get you hired. We're already working to place several early Gridmancer players.

Constructing Rectangles Java quiz

On coding365

Solve the problem

The goal of this problem is to achieve the following:

I needed to create two rectangles that touch each other at a corner. With the values: x-coordinate = 60, y-coordinate = 90, width = 20, height = 30.

My solution to the problem is:

Rendering New Theme...