0
Reverse a output
hello, on line 173 starts the print function , this function prints out the maze: for(int i = 0; i < grid.size(); i++){ for(int j = 0; j < grid[i].size(); j++){ cout << grid[i][j] << " "; } } how do i reverse this output i want the x axis reversed and the y axis reversed thx in advance if you want to know why i want this reversed try solving it like normal and then start from the end, when you start from the end the maze becomes much harder that how the algorithm works https://code.sololearn.com/cqbnQ9W1kXlq/?ref=app
2 ответов
+ 2
you can go throw the array in reverse like this:
for(int i=grid.size()-1;i>=0;i--){
+ 1
Anton Böhler wow, thank you :)