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
static int g_infoStackDepth = 0; | |
static vector<string> g_infoStack; | |
const int MaxInfoLength = 2056; | |
void push_info_stack(const string str) | |
{ | |
g_infoStack.push_back(str); | |
} | |
void pop_info_stack() |
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
void change(vector<int>* coins, int n) | |
{ | |
vector<int> table(n + 1); | |
table[0] = 1; | |
table[1] = 1; | |
for (int i = 2; i < n + 1; i++) | |
{ | |
int min = 0; | |
int prev = 0; |
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 <iostream> | |
#include <string> | |
using namespace std; | |
int main(){ | |
int x = -1234; | |
string y; | |
int temp; | |
int templeft; |
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 <iostream> | |
using namespace std; | |
#include <list> | |
void TA(int n){ | |
list<int> m; | |
m.push_back(2); | |
for( int i = 3; i <= n; i+=2) | |
m.push_back(i); |
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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <map> | |
#include <set> | |
#include <list> | |
using namespace std; | |
bool valid( map<char, vector<int>> m, string me){ | |
// this one checks if a string is valid |
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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <math.h> | |
#include <map> | |
#include <algorithm> | |
#include <vector> | |
#include <iostream> | |
#include <set> | |
#include <list> |
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
int main(){ | |
string x = "helllo there sd"; | |
string d; | |
stringstream ss(x); | |
while( getline(ss, d, ' ') ){ | |
cout << d << endl; | |
} | |
cin.get(); |
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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <math.h> | |
#include <map> | |
#include <fstream> | |
#include < ctime > | |
#include <algorithm> | |
#include <vector> | |
#include <iostream> |
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 <iostream> | |
#include <string> | |
#include <vector> | |
#include <math.h> | |
#include <map> | |
#include <fstream> | |
#include < ctime > | |
#include <algorithm> | |
#include <vector> | |
#include <iostream> |
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
template <class T> | |
class SortedList | |
{ | |
public: | |
SortedList():m_head(nullptr),size(0) | |
{} | |
void Push(T value); | |
T Pop(); | |
int Size(); |
NewerOlder