Quote:
It's like a snake moving from the top to the pyramid to the bottom and eat the best score.
You have no magic way to know that an answer is the best or not.
It is a brut force attack.
To know that an answer is best score, you need to check all other answers.
You have to build an algorithm that will check every single solution.
[Update]
Quote:
This is in dynamic programmation... But i search for a constraint to avoid to always take the best score and only take adjacent best scores.
As programmer,
your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.
When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.