getting segmentation fault, i code according to the question given in the graph challenges
Getting segmentation fault
@shivamgoel150
This is the updated code:
There were some errors in your code.
- Size of the board array must be equal to (cell + 1) because you are storing the increment or decrement for each number between 1 and cell. Also initialize the array to 1.
- The play starts from index 1 and not 0. Please correct that.
- Start the bfs from index 1.
Refer to the updated code and correct your code.
If my answer was able to answer your query, please mark the doubt as resolved.