diff --git a/Leetcode/C++/RottingOranges.c++ b/Leetcode/C++/RottingOranges.c++ new file mode 100644 index 000000000..4f4f5a687 --- /dev/null +++ b/Leetcode/C++/RottingOranges.c++ @@ -0,0 +1,30 @@ +class Solution { +public: + void dfs(vector>& grid,int i,int j,int time) { + if(i<0 || i>=grid.size() || j<0 || j>=grid[0].size() || grid[i][j]==0 || 1 < grid[i][j] && grid[i][j]>& grid) { + for(int i=0; i