Relative Content

Tag Archive for algorithmrecursiondata-structuressemanticsbacktracking

can you explain the logic of this backtracking code here?

I understand the concept of backtracking, but the code doesn’t seem to me like it’s simulating the logic, even if I crazily try to trace the call stack (with a for loop it’s almost impossible). For example, how does the permutation algorithm below work exactly, step by step ?