Skip to content

Instantly share code, notes, and snippets.

View joybro's full-sized avatar

Young Lee joybro

  • Coupang.com
  • Seoul, Korea
View GitHub Profile
#include <algorithm>
#include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include <cstring>
#include <cmath>
using namespace std;
#include <algorithm>
#include <string>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <sstream>
#include <cstring>
#include <cmath>
using namespace std;
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <math.h>
#include <sstream>
#include <stdio.h>
#include <vector>
using namespace std;
// 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:
#include <algorithm>
#include <iostream>
#include <vector>
#include <sstream>
#include <cstring>
#include <cmath>
#include <math.h>
#include <stdio.h>
inline std::vector<unsigned> getI() {
// 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>
// 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>
// 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;
// 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) {
// 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;