L
Luc The Perverse
I'm on topcoder.com and there are a series of problems that I cannot solve
because I can't come up with an algorithm to do it.
Except - in a way, they are all the same problem.
Travelling salesman, moving around a chessboard, removing numbers from a
sequence - I see them all as the same trivial method that somehow I am
missing. They all involve choices that branch off and begin from previous
choices and an optimal result where brute force attack is always infeasable
(given the test cases provided).
What do I do? I see about 3 or so options:
1. Buy an algorithm textbook. (A real gamble)
2. Look at and try to decipher the code? (Frustrating, but perhaps the most
educational)
3. Trying to look online for methods for solving classic algorithms.
I don't want to learn how to just solve one problem. I know they are all
connected somehow - I just can't see it.
I know I should know this stuff, and I feel kinda dumb asking - but how
should I proceed?
One of the problems was, given an imaginary chess piece (it was a
combination knight and king I believe), a board nXn dimensions (n provided)
and a starting and ending location, and a number of moves, tell me how many
unique ways there are to get from the starting to ending position (the
return value was a long so the problem stated that the system would ensure
that there were less than 2^63-1 for the given problem.)
If a textbook is the way I need to go about this - then it is alright to
tell me so. But right now I'm leaning away from that option.
because I can't come up with an algorithm to do it.
Except - in a way, they are all the same problem.
Travelling salesman, moving around a chessboard, removing numbers from a
sequence - I see them all as the same trivial method that somehow I am
missing. They all involve choices that branch off and begin from previous
choices and an optimal result where brute force attack is always infeasable
(given the test cases provided).
What do I do? I see about 3 or so options:
1. Buy an algorithm textbook. (A real gamble)
2. Look at and try to decipher the code? (Frustrating, but perhaps the most
educational)
3. Trying to look online for methods for solving classic algorithms.
I don't want to learn how to just solve one problem. I know they are all
connected somehow - I just can't see it.
I know I should know this stuff, and I feel kinda dumb asking - but how
should I proceed?
One of the problems was, given an imaginary chess piece (it was a
combination knight and king I believe), a board nXn dimensions (n provided)
and a starting and ending location, and a number of moves, tell me how many
unique ways there are to get from the starting to ending position (the
return value was a long so the problem stated that the system would ensure
that there were less than 2^63-1 for the given problem.)
If a textbook is the way I need to go about this - then it is alright to
tell me so. But right now I'm leaning away from that option.