Which of the following data structures has an application named 'Backtracking'?
-
Stack
-
Queue
-
Tree
-
Array
-
None of the above
A
Correct answer
Explanation
Yes, backtracking is an application of stack data structure. In backtracking, we use one point from source to destination to reach and choosing the path according to stack and if we get a wrong path, then we pop the last path from the stack and then return back to the last point and then again choose the right path.