This file contains 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 <vector> | |
#include <algorithm> | |
#include <set> | |
using namespace std; | |
const int INF = 99999999; | |
void BellmanFord(vector<pair<int, pair<int, int> > >& g, vector<int>& d, int n, int k) { |
This file contains 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 <vector> | |
#include <algorithm> | |
using namespace std; | |
bool had_circle(const vector<vector<int>>&, vector<char>&, int); | |
bool t_sort(const vector<vector<int>>&, vector<int>&, vector<char>&, int); | |
void find_strong_linked_components(const vector<vector<int>>&, vector<int>&, vector<char>& used, int); |
This file contains 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
@Override | |
public boolean removeAll(Collection<?> c) { | |
for(Object item: c) { | |
int index = indexOf(item); | |
while(index >= 0) { | |
remove(index); | |
index = indexOf(item); | |
} | |
} |
This file contains 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 <stdio.h> | |
#include <vector> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <iomanip> | |
#include <algorithm> | |
using namespace std; |
This file contains 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 <vector> | |
#include <iostream> | |
#include <stdio.h> | |
#include <algorithm> | |
using namespace std; | |
vector< vector<int> > g, gm; | |
vector< int > cc; | |
vector< int> ans; |
This file contains 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
public void testPrint() { | |
Stack s1 = new Stack(); | |
s1.push(root); | |
int emptyLeaf = 32; | |
boolean isRowEmpty = false; | |
while(isRowEmpty == false) { | |
Stack s2 = new Stack(); | |
isRowEmpty = true; |
This file contains 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 <bits/stdc++.h> | |
using namespace std; | |
struct Node { | |
int key; | |
double prior; | |
int height; | |
Node* left; | |
Node* right; |
This file contains 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 <ctime> | |
#include <stdlib.h> | |
#include <vector> | |
using namespace std; | |
class Solution { |
This file contains 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 <bits/stdc++.h> | |
using namespace std; | |
typedef unsigned long long ull; | |
int main(void) { | |
ios::sync_with_stdio(false); | |
int n; |
This file contains 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
<html> | |
<head> | |
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places"></script> | |
</head> | |
<body> | |
<input id="searchTextField" type="text" size="50"> | |
<script> | |
function initialize() { |
OlderNewer