Back
Close
  • 10

What will I practice?

Dynamic programmingMemoizationPathfindingRecursion

In this puzzle, you implement a pathfinding algorithm, where the goal is not the shortest path but maximizing a score. You have to prune a decision tree based on a heuristic.

External resources

Breadth First SearchDijkstra

Statement

You have to find a way out of a maze, except you are not looking for the shortest path, but to maximize the combined weight of the nodes you traverse. You can tweak an existing shortest-path algorithm or implement your own weighted graph search.

A higher resolution is required to access the IDE

Story

Jackpot! Bender finds himself in the building of CodinGame, an incredibly vast series of corridors and rooms. The employees at CodinGame being a bit distracted by their work, they accidently drop bank notes every now and then (on the way to the coffee machine, the pool, the billiard table, ?). There's a large amount of cash to grab, and Bender is decided to get his share.

Help him to get as much money as he can and leave the building before the angry employees of CodinGame behead him to salvage his RAM.

 

If you like Bender and Futurama, try your luck with the other puzzles including Bender (on the same theme), « Bender - Episode 1 » and « Bender - Episode 3 ».

Online Participants