This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <algorithm> | |
| #include <string> | |
| #include <iostream> | |
| #include <vector> | |
| #include <sstream> | |
| #include <cstring> | |
| #include <cmath> | |
| using namespace std; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <algorithm> | |
| #include <string> | |
| #include <stdio.h> | |
| #include <iostream> | |
| #include <vector> | |
| #include <sstream> | |
| #include <cstring> | |
| #include <cmath> | |
| using namespace std; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <algorithm> | |
| #include <cmath> | |
| #include <cstring> | |
| #include <iostream> | |
| #include <math.h> | |
| #include <sstream> | |
| #include <stdio.h> | |
| #include <vector> | |
| using namespace std; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // http://www.geeksforgeeks.org/level-order-tree-traversal/ | |
| // Time Complexity: O(n) | |
| // Space Complexity: O(n) | |
| #include <assert.h> | |
| #include <iostream> | |
| #include <queue> | |
| class Node { | |
| public: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <algorithm> | |
| #include <iostream> | |
| #include <vector> | |
| #include <sstream> | |
| #include <cstring> | |
| #include <cmath> | |
| #include <math.h> | |
| #include <stdio.h> | |
| inline std::vector<unsigned> getI() { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // https://algospot.com/judge/problem/read/DOLLS | |
| // Time Complexity: O(nlogn) | |
| // Space Complexity: O(n) | |
| #include <algorithm> | |
| #include <cstdio> | |
| #include <cstring> | |
| #include <cmath> | |
| #include <iostream> | |
| #include <limits> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // http://codercareer.blogspot.kr/2012/02/no-33-maximums-in-sliding-windows.html | |
| // Time Complexity: O(n) | |
| // Space Complexity: O(n) | |
| #include <algorithm> | |
| #include <assert.h> | |
| #include <stack> | |
| #include <stdio.h> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // http://codercareer.blogspot.kr/2011/10/no-16-maximum-length-of-incremental.html | |
| // Time Complexity : O(n^2) | |
| // Space Complexity : O(n) | |
| #include <assert.h> | |
| #include <cstring> | |
| #include <algorithm> | |
| const int kMaxLen = 100; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // http://codercareer.blogspot.kr/2011/09/no-02-stack-with-function-min.html | |
| // Time Complexity : O(1) | |
| // Space Complexity : O(n) | |
| #include <assert.h> | |
| #include <stack> | |
| class MinStack { | |
| public: | |
| int push(int v) { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // http://codercareer.blogspot.kr/2014/10/no-56-maximal-value-of-gifts.html | |
| // Time Complexity : O(n) | |
| // Space Complexity : O(n) | |
| #include <algorithm> | |
| #include <assert.h> | |
| #include <cstring> | |
| const int N = 4; | 
NewerOlder