Archive for the ‘general_problems’ Category

8 queen problem (backtracking)

July 5, 2018

Backtracking problems tries to create a solution tree, once previous instances pass. If condition fails at some point, it backtracks to the previous instance where it was successful, and try other possible options.



Create all possible combinations

September 24, 2017

This was an attempt to solve SPOJ – SQRBR, but gives TLE. It explores all the options recursively, and without the use of dynamic programming. This technique can be used to generate all the combination of certain values.  (more…)