Question DSA-REC-0075
HardWhat does the 'rat in a maze' backtracking solution do when it reaches a dead end?
- A.
Starts again from the beginning
- B.
Breaks through the wall
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Recursion and Backtracking question
What does the 'rat in a maze' backtracking solution do when it reaches a dead end?
Starts again from the beginning
Breaks through the wall
Sign up free to see the answer and a step-by-step explanation.
Steps back to the previous cell and tries another direction
Stops completely