Posts

Showing posts with the label coding

Backtracking

Image
  Introduction: Is this the first time you are learning about backtracking? If your answer is Yes then you are wrong. As a kid we have solved many maze puzzles. For solving all those mazes the idea which we used is Backtracking. For example consider below image, the person need to come out of maze so he chooses a path and goes in that direction. If he sees a dead-end then he comes back one step and moves in another direction. He continues to do it until he comes out of the maze. This is nothing but Backtracking. Here the person chooses a path, if its a dead-end, he eliminates it, backtrack and check for other paths and it continues until he gets out of it. What does the name Backtracking mean? Backtracking is an algorithmic technique to solve computational problems. It searches in all possible ways then removes dead-end or step that does not lead to a solution and backtracks and continues to explore other branches. Backtracking is  like a refined brute force algorithm that cho...

Popular posts from this blog

Top 7 Frameworks You'll Need to Learn in 2022

Garbage Collection Java

Backtracking