param_codes's blog

By param_codes, history, 13 days ago, In English

I have already solved a lot of problems on this but still when some new problem pops I couldn't able to code the solution even if I know the approach.. so what should I do for this??.................

  • Vote: I like it
  • -4
  • Vote: I do not like it

»
13 days ago, # |
  Vote: I like it 0 Vote: I do not like it

You should have a clear idea of how backtracking works (in your problem) and develop intuition for it, perhaps start with a simple case on your paper to simulate it effectively. Understand what happens when it backtracks, the pattern, the recurrence, and observe various codes to gain insights into different approaches

»
13 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Pen and paper

»
12 days ago, # |
  Vote: I like it 0 Vote: I do not like it

Go and solve Usaco complete search with recursion problems and you will be fine