Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<set>
- #include<unordered_set>
- #include<map>
- #include<unordered_map>
- #include<vector>
- #include<string>
- #include<stack>
- #include<queue>
- using namespace std;
- /*
- 1. verify you understood the question and ask if you have any questions
- 2. idea
- 3. verify the idea
- 4. write the code
- 5. verify the code
- */
- void print(int n){
- auto ret = spiral(n);
- for(auto a : ret){
- for(int x : a)
- cout<<x<<" ";
- cout<<endl;
- }
- cout<<"__________________"<<endl;
- }
- // https://leetcode.com/problems/pacific-atlantic-water-flow/
- int main()
- {
- //print(0);
- print(1);
- print(2);
- print(3);
- print(4);
- return 0;
- }
Add Comment
Please, Sign In to add comment