uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d1083812-0c33-4dc5-88dc-6714a96383cb
Gescheld/TicTacToe
AIPlayer.cpp
#include "AIPlayer.h" // Choose degree of difficulty void AIPlayer::levelSelection() { giveUp = false; char input = ' '; std::cout << "\n\nDIFFICULTY\n\n1: Easy\n2: Medium\n3: Hard\n\n4: Return\n"; std::cin >> input; int inputNumber = input - '0'; // char to int // Return to menu if (input == '4' || input == 'q...
TOOL
0.940713
3.921916
1eac4274-c16c-49b6-b1a3-a2645f33d0ef
sabernaserifar/RexPoN
src/fix_wall_region.cpp
#include <math.h> #include <stdlib.h> #include <string.h> #include "fix_wall_region.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" #include "region.h" #include "force.h" #include "lattice.h" #include "update.h" #include "output.h" #include "respa.h" #include "error.h" #include "math_const.h" using name...
ALGO
0.99073
6.755493
9a19b0fc-246b-4b5f-8aec-c065bf13d83f
code233trainee/lijiminbest
CodeForese/div3/998_div3/C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 2e5 + 5; int a[N]; map<int, int> mp; void solve() { int n, k; cin >> n >> k; mp.clear(); for(int i = 1; i <= n; i++) { cin >> a[i]; } int ans = 0; //直接匹配 //先选的想要得分最低,但是每一个有无得分的对都可以被后选的选上 ...
ALGO
0.99995
4.444197
cac58d5f-56a9-423d-8137-bbeff44d6281
charguer/optitrust
tests/expr/replace/expr_replace.cpp
int f (int x) { int y = 1; return y+x; } int f1 (int x) { int y = -1; return y+x; } int f2 (int x, int y, int z) { return x + y + z; } int main(){ int a = 5; int i = 10; int b = a; a = f(a); int x = 6; int c = f1(4); int d = f2(1,2,3); int e = f2(1,2,2); return 0; }
ALGO
0.933638
3.60115
f67ba628-8602-4026-8049-e93a6d6a185e
JuliaRAlves/algoritmos-de-busca-e-ordenacao
shell sort.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <locale.h> #include <string.h> #define N 10 void shellSort(int *vet){ int k=3, h=1, aux, j; while (h<=N) h=k*h+1; while (h!=1){ h=h/k; for (int i=h; i<N; i++){ aux=vet[i]; j=i-h; while (j>=0 && aux<vet[j]){ vet[j+h]=vet[j]; j=...
ALGO
0.999942
3.840202
b6e7f3a3-044d-4c10-9599-f55dd37ce9bc
ChaitanyDalvi06/CPP-All-Codes
reverse.cpp
#include <iostream> using namespace std; int main() { string n,reverse; cout<<"Enter the number : "; cin>>n; for (int i = n .length()-1 ; i>=0; i--) { reverse+=n[i]; } cout<<"the reverse number is "<<reverse<<endl; return 0; }
ALGO
0.998936
4.196939
91bda135-724e-4d19-a1f8-296b5f718473
Ruben080506/tarea_27
mayor_vectores_ejer01.cpp
/* 3. Usando un proceso de ordenacion de los vistos en clases, diseñe la funcions que devuelva el elemento mayor de la lista, solo necesita ordenar, no necesita agregar condicionales */ #include <iostream> #include <time.h> #include <stdlib.h> using namespace std; //llena el vector con numeros aleatorios void llenar...
ALGO
0.999105
4.519882
1140c913-0e91-4a95-80fe-11a80053bc9c
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_5240_5.cpp
#include <bits/stdc++.h> using namespace std; int main() { int i, k, n, p, p1, val, count, j, x; char dummy; scanf("%d%c", &k, &dummy); char c; char s[1000]; scanf("%[^\n]%c", s, &dummy); int str[k][strlen(s)]; int A[k][30]; for (i = 0; i < strlen(s); i++) for (j = 0; j < k; j++) A[j][s[i] - 'a'] ...
ALGO
0.999963
3.185614
dc2a6398-7a05-4f21-928c-cc645bfa2aa6
sh-arka22/LeetcodeContest
Weekly Contest 322/D.cpp
// 2493. Divide Nodes Into the Maximum Number of Groups class Solution { public: int bfs(vector<vector<int>> &adj, int curr, int n) { vector<bool> vis(n + 1, 0); queue<int> q; q.push(curr); vis[curr] = 1; int cnt = 0; while (!q.empty()) { int size = q.size...
ALGO
0.999798
5.794734
279a5eaf-e499-4544-b2a5-6e726876ad69
Austin2501/DSA-GRIND
C++/Pattern/Pattern14.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int i=1; char ch = 'A'; while(i<=n){ int j=1; while(j<=n){ cout<<ch; ch = ch+1; j=j+1; } cout<<endl; i=i+1; } } //same logic as used in numb...
ALGO
0.999742
4.029119
996ea0b0-bb43-43ad-af80-0d5c532a6224
qiatongxueshaonianC/CaiZebin-Code_warehouse
高级专题/字符串哈希/PAT顶级1005/H[i..j]左闭右开写法/main.cpp
#include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; const int MOD=1e9+7; const int P=1e7+19; typedef long long LL; const int maxn=1048576+5; LL powP[maxn],H[maxn]; //gp_hash_table<LL,int> mp; //ڴ泬 unordered_map<LL,int> ...
ALGO
0.999967
3.71388
e28cd4cf-91db-4f1e-a5a2-578511fadae9
ishandutta2007/codeforces
jonathanirvings/normal/995/A.cpp
//start of jonathanirvings' template v3.0.3 (BETA) #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> pii; typedef pair<LL,LL> pll; typedef pair<string,string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<LL> vl; typedef vector<vl>...
ALGO
0.999459
3.00963
33a71b9a-2c40-4693-812e-792f50478fb3
dhanna11/OpenGPU
software/mesa/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
#include "brw_fs.h" #include "brw_cfg.h" /** @file brw_fs_cse.cpp * * Support for local common subexpression elimination. * * See Muchnick's Advanced Compiler Design and Implementation, section * 13.1 (p378). */ using namespace brw; namespace { struct aeb_entry : public exec_node { /** The instruction that ...
ALGO
0.988919
4.349154
41550e5c-7525-4094-a689-97191804237e
sjtubinlong/Programming-Challenges
leetcode/StringtoInteger.cpp
class Solution { public: int atoi(const char *str) { // Note: The Solution object is instantiated only once and is reused by each test case. if( str==NULL ) return 0; const char* cur = str; while( *cur==' ') ++cur; if( *cur=='\0' ) return 0; int flag = 1; if( ...
ALGO
0.998946
5.08708
75b3b13d-085c-49a6-b9b2-0c4bd99c66db
bachtran02/comp-prog
codeForces/cf707/A_Alexey_and_Train.cpp
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while(t--){ int n; cin >> n; vector<int> a(n+1),b(n+1), tm(n+1); for(int i = 1; i <= n; i++){ cin >> a[i] >> b[i]; } for(in...
ALGO
0.99987
3.244035
7f1b5f17-60fc-46a6-9e08-78bbe281fb48
saranshs17/CP-stuff
Tree/Bottom View(BT).cpp
void find(Node * node,int &l,int &r,int curr){ if(node==NULL)return ; l=min(l,curr); r=max(r,curr); find(node->left,l,r,curr-1); find(node->right,l,r,curr+1); } vector <int> bottomView(Node *root) { // Your Code Here int l=0,r=0; find(root,l,r,0); ...
ALGO
0.999979
5.814299
85950cce-65a4-42b9-bf3d-b33f7bb4b358
adhirajChauhan/PEP_LPU_DSA_2025_GIT
PEP_DSA_JAN25/CPP/06_Pointers/02.cpp
#include<iostream> using namespace std; void test(int &num){ ++num; cout << "num value in test : " << num << endl; } int main() { int num; cin >> num; test(num); cout << "Final output : " << num << endl; }
ALGO
0.853019
4.153692
1bc490a6-5f5e-48fd-8f1a-b5aeef5b3f81
HomeElephant/Tetris
maincpp.cpp
#include<iostream> #include <SFML/Graphics.hpp> using namespace sf; //make a game field int const Height = 20; int const Weidth = 30; int gameField[Height][Weidth] = { 0 }; //make an arrow for tetramino int Figures[7][4] = { 2,3,4,5, //O 3,4,5,7, //T 3,4,5,6, //Z 3,5,7,6, //J ...
TOOL
0.914181
3.376348
aaaca207-5c71-41a1-8a0e-2d7cce3d6fb3
cepc/CEPCSW
Reconstruction/Tracking/src/Clupatra/ClupatraAlg.cpp
#include "ClupatraAlg.h" #include "clupatra_new.h" #include <time.h> #include <vector> #include <map> #include <set> #include <algorithm> #include <math.h> #include <cmath> #include <memory> #include <float.h> //---- MarlinUtil //---- LCIO --- //#include "IMPL/LCCollectionVec.h" //#include "EVENT/SimTrackerHit.h" /...
ALGO
0.998681
5.879648
1f52ce0b-5118-4884-b39a-70fc1c2fc7fe
kartik-py12/neoColab
ans/1.cpp
#include <iostream> using namespace std; void minHeapify(int arr[], int size, int i) { int smallest = i; int left = 2 * i + 1; int right = 2 * i + 2; if (left < size && arr[left] < arr[smallest]) { smallest = left; } if (right < size && arr[right] < arr[smallest]) { smallest =...
ALGO
0.999985
5.155894
a7fab3cb-6ae6-472d-8677-bbd8f9d66d19
KagE-Akumaa/Coding
Codeforces/cp-1000-1300/lucky.cpp
#include <bits/stdc++.h> #define int long long int using namespace std; int n = 6; void solve() { string str; cin >> str; int sumF = str[0] + str[1] + str[2]; int sumS = str[3] + str[4] + str[5]; if (sumF == sumS) { cout << "YES\n"; return; } cout << "NO\n"; } int32_t main() { ios::sync_with_st...
ALGO
0.99969
5.023188
0cb3e9df-5e63-4367-8460-cc9c41b39160
raincross7/code-similarity
codes/train_code/problem271/problem271_421.cpp
#include<bits/stdc++.h> using namespace std; int main(){ double x1, y1, x2, y2, x3, y3, x, y; while(cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x >> y){ double a = x1*(y2 - y3) + x2*(y3 - y1) + x3*(y1 - y2); double b = x*(y1 - y2) + x1*(y2 - y) + x2*(y - y1); double c = x*(y2 - y3) + x2*(y3 - y) + x3...
ALGO
0.999602
3.554883
e9d63428-e205-4503-b210-f9d0b33b6090
RHEA211/Searching-and-Sorting
linears.cpp
//LINEAR SEARCH #include<bits/stdc++.h> using namespace std; int linearsearch(int arr[],int n,int key) { for(int i=0;i<n;i++) { if(arr[i]==key) { return i; } } return -1; } int main() { int n,arr[10],key; cout<<"Number of elements in array-"<<endl;...
ALGO
0.999835
5.366272
8e6b06b2-ed41-4f40-85cd-6f8011e14e9f
cpccu/cpccu-contest-3
D/48946326_AC_niloy097_D.cpp
#include <bits/stdc++.h> #define OJ #define ROCKET \ ios ::sync_with_stdio(false); \ cin.tie(nullptr); \ cout.tie(nullptr); #define ll long long int #define fr(x, s, e, b) for (ll x = s; x < e; x = x + b) #define rfr(x, s, e, b) for (ll x = s; x >= e; x = x - b) #define efr(va...
ALGO
0.999066
4.378951
c897d8b3-df80-4a5f-850d-4a8067ad8cee
rahulsrivastava1/DSA-BASKET
Backtracking/generate_ip_address.cpp
// Generate IP address // utility-function 1 bool isValid(string s,int i,int j,int k,int n){ if(valid_sub(s,0,i) && valid_sub(s,i+1,j) && valid_sub(s,j+1,k) && valid_sub(s,k+1,n-1)) return true; return false; } // utility-function 2 bool valid_sub(string s,int i,int j){ int len=j-i+1; if(len>3) return...
ALGO
0.99624
3.867496
9e172b4b-9f3c-42c8-aee6-79b2942ff62e
kchung1995/code_test_personal
na_codwpy/4-2_시각_1.cpp
#include <iostream> #include <string> using namespace std; int n; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n; int cnt = 0; for (int h = 0; h <= n; h++) { for (int m = 0; m <= 59; m++) { for (int s = 0; s <= 59; s++) { if (...
ALGO
0.997941
3.805913
171eeb2f-acf1-4368-bcd4-6ad4d4d656ee
longbow007/LeetCode_Cpp
leetcode/141. Linked List Cycle/linked_list_cycle.cpp
// // linked_list_cycle.cpp // Algorithm-Cpp // // Created by Xiaojian Duan on 2022/2/2. // #include "linked_list_cycle.hpp" #include "ListNode.hpp" bool hasCycle(ListNode *head) { if (head == nullptr || head->next == nullptr) return false; ListNode *slow = head, *fast = head->next; while (slow != fast...
ALGO
0.995349
4.775929
6b8f828a-d4e4-4932-8ba8-e9685fc7c7a2
manojborugadda/Leetcode-questions
2391. Minimum Amount of Time to Collect Garbage/main.cpp
class Solution {//TC:O(N*M) N-- length of the garbage and M --- length of the string 'str' public://SC:O(1) int garbageCollection(vector<string>& garbage, vector<int>& travel) { vector<int>prefix(travel.size(),0); int n = travel.size(); int m = garbage.size(); prefix[0] = travel[0];...
ALGO
0.997897
6.375596
41c03b2a-a7f3-4da2-a202-8b2afa918e0d
vaishu202004/c-
14-03-h3.cpp
#include <iostream> class Matrix { private: int rows; int cols; int **data; public: // Constructor Matrix(int r, int c) : rows(r), cols(c) { data = new int*[rows]; for (int i = 0; i < rows; ++i) { data[i] = new int[cols]; for (int j = 0; j < cols; ++j) { ...
ALGO
0.883145
6.381444
a71aa36b-e196-4128-b336-786b2d8215e3
sijanz/robust_people_follower
src/recovery_module.cpp
#include <geometry_msgs/PointStamped.h> #include <angles/angles.h> #include "robust_people_follower/recovery_module.h" #include "robust_people_follower/status_module.h" void RecoveryModule::predictTargetPosition(const Person& t_target, const double t_interval_sec) { // velocity auto velocity{t_target.meanVelo...
ALGO
0.998264
5.549174
20b8c585-edfc-4422-b665-2cf2cfb28370
donguyenphu/Coding_Solution
CodingFolder/VNOI/triphp.cpp
#include <bits/stdc++.h> #define ll long long #define pb push_back using namespace std; const ll N=1e5+3; const ll inf=1e16; bool vis[N]; vector <ll> adj[N]; vector <ll> divv[N]; vector <pair<ll,ll>> st; ll n,u,v,res[N],tim=0,num[N]; ll dis[N],pa[N][30],dis1[N],trace[N],res2[N]; bool path[1002][1002]; void sang() { ...
ALGO
0.999759
3.839769
828e2eea-835e-400f-a886-668d1ab9b8fb
arrxy/codes
GRAPH/dijsktra.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define endl '\n' #define vb vector<bool> #define vbb vector<vb> #define vi vector<int> #define vvi vector<vector<int>> #define inf 1e18 #define setbits(x) ...
ALGO
0.999968
4.725745
37afc699-b283-4945-ba8b-7029f05b7b0c
Reriiii/marisaoj-practice
level-1/sorting/322.cpp
#include <bits/stdc++.h> #define NAME "" #define i32 int #define i64 int64_t #define u32 unsigned int #define u64 unsigned long long #define ll long long #define ld long double #define ii pair<int, int> #define vi vector<int> #define vii vector<vector<int>> #define vec vector #define sz(a) (u32)(a.size()) #define all(...
ALGO
0.999897
4.657918
8781a8f2-7203-4cca-9010-79d71e0ac1e4
Uday-Berad22/Leetcode-Questions
Longest Common Prefix in an Array - GFG/longest-common-prefix-in-an-array.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Node { private: Node *links[26]; bool flag; public: bool isContainsKey(char ch) { return (links[ch - 'a'] != NULL); } void putCha...
ALGO
0.999771
5.384659
c04ca071-a912-4324-83ac-b2f7b89c2869
jin3811/BAEKJOON
1251.cpp
#include <bits/stdc++.h> #define endl '\n' #define ALL(X) (X).begin(), (X).end() using namespace std; void sol(const string& str) { string result, tmp, tmp1, tmp2, tmp3; result. for (int i = 0; i <= 100; i++) result += "z"; for (int i = 1; i < str.length(); i++) { for(int j = i + 1; j < ...
ALGO
0.999903
5.095481
19f3deec-8677-4d0c-a463-f00412987452
chinmay-gupta-2003/StriverA2Z
STEP15 (GRAPHS)/LEC4/minOperations.cpp
#include <bits/stdc++.h> using namespace std; int minimumOperations(int n, int start, int end, vector<int> &a) { // Write your code here int mod = 1e3; queue<pair<int, int>> q; vector<int> steps(mod, INT_MAX); steps[start] = 0; q.push({0, start}); while (!q.empty()) { auto front = q.front(); ...
ALGO
0.999944
4.103368
6195ef35-2576-4309-aaaa-eef42b4f5486
Xornet-Euphoria/competitive_programming
cpp/math/mod.cpp
#include <iostream> #include <cassert> using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < n; i++) #define repr(i, a, b) for(int i = a; i < b; i++) template<typename T> T gcd(T a, T b) { if (a < b) { swap(a, b); } while (b != 0) { a = a % b; swap(a, b...
ALGO
0.999073
3.82883
642ca42c-c3e0-423c-bbaa-485282e476e0
vbonnici/grafe-sim
analysis/data/p00740/s769634683.cpp
#include <iostream> #include <algorithm> using namespace std; int main(){ int n,p; while(cin >> n >> p, n!=0 && p!=0){ int s[n]; int index = 0; int stone = p; for(int i=0;i<n;i++){ s[i] = 0; } while(true){ if(stone > 0){ s[index]++; stone--; }else if(stone == 0){ ...
ALGO
0.999843
3.283069
6f61bc5c-aa62-4f14-a204-3141514204d5
Lijah99/competitiveProgramming
2week/vote.cpp
#include <iostream> #include <vector> using namespace std; int main() { int num,candidates; vector<int> votes; int winner, winnercand; bool tie = false; int temp; int total = 0; cin >> num; for(int i = 0; i < num; i++) { votes.clear(); tie = false; total = ...
ALGO
0.999987
4.316656
a2803283-61f8-4821-9846-80b40e5ad2d0
ajay/ROSE
robot/particle/particle_current/mathfun.cpp
#include "mathfun.h" #include <cmath> #include <cassert> using namespace arma; double limit_value(double x, double a, double b) { return ((x < a) ? a : ((x > b) ? b : x)); } /** This maps a value from one domain to another */ double map_value(double x, double a1, double b1, double a2, double b2) { assert(a1 != b1...
ALGO
0.999498
6.801373
05dd5bbd-f2a3-4770-b6a7-69b25f22f181
SuchitanKulkarni/CPP_Programing_Practice
Assignment No. 1/Pro16.cpp
/* 16.Complete the following main() function. int main() { int a,b; } -store address of a in pa and address of pa in ppa. -store address of b in pb and address og pb in ppb. -scan a using pa. -scan b using ppb. -print addition of a and b using ppa and pb. -check if a is even or odd using ppa. */ #include<iostre...
ALGO
0.99226
3.581143
d83526f9-c73a-431b-8ede-f9570f76fb67
acr-official/acreage
src/core_read.cpp
#include "core_io.h" #include "primitives/block.h" #include "primitives/transaction.h" #include "script/script.h" #include "serialize.h" #include "streams.h" #include "univalue/univalue.h" #include "util.h" #include "utilstrencodings.h" #include "version.h" #include <boost/algorithm/string/classification.hpp> #includ...
TOOL
0.864696
7.187389
a0ac65af-66a2-4d08-a5dc-c1d071ff1cb6
abdur-rafi/Codeforces-practice
575 a.cpp
#include <iostream> using namespace std; #define PII pair<int,int> #define ll long long #define loop(x,n,a) for(int x =a; x < n;++x) #define loop_rev(x,n,a) for(int x = n-1; x >= a;--x) int main(){ ll n;cin>>n; while(--n>=0){ ll a,b,c; cin>>a>>b>>c; ll r=(a+b+c)/2; cout<<r<<'\n'; } retur...
ALGO
0.999542
3.882365
c62b6cdb-d5a8-4d07-ba99-8fdf3a7472d5
ishandutta2007/codeforces
wxhtzdy/normal/11/D.cpp
/** * author: milos * created: 23.03.2021 14:56:16 **/ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector<vector<int>> g(n, vector<int>(n)); for (int i = 0; i < m; i++) { int u, v; cin >> u >> v; ...
ALGO
0.999822
4.667664
556e0ad1-c46d-474c-92fd-a342d8a3fe11
ishandutta2007/codeforces
serval/normal/1734/C.cpp
#include <cstdio> #include <algorithm> #include <vector> using namespace std; const int N = 1e6 + 5; int n; char s[N]; vector <int> factors[N]; int cnt[N]; long long ans; void pre() { for (int i = 1; i < N; i++) { for (int j = i; j < N; j += i) factors[j].emplace_back(i); } } void solve() { ans = 0; sc...
ALGO
0.999867
4.320171
14eeca06-1891-49f4-aa06-deb1f1a78101
cstkennedy/cs330-examples
99-Lecture-Snippets/iterator-discussion-offsets/example.cpp
#include <string> #include <iostream> #include <iomanip> #include <cstdlib> #include <cmath> #include <algorithm> #include <iterator> #include <vector> #include <list> using namespace std; /** * Return a pair of iterators representing the beginning and end of a container * * @tparam C a type "container" that prov...
TOOL
0.978742
5.887838
712bee14-0ecb-4752-ac6e-8d9d5de64a92
bytedance/terark-zip
3rdparty/boost-include/libs/math/example/fft_sines_table.cpp
// This file is written to be included from a Quickbook .qbk document. // It can be compiled by the C++ compiler, and run. Any output can // also be added here as comment or included or pasted in elsewhere. // Caution: this file contains Quickbook markup as well as code // and comments: don't change any of the special ...
ALGO
0.989629
5.532396
ed09cae1-431e-41a2-aa57-80c81950a867
iains/LLVM-8-Branch
llvm/tools/llvm-exegesis/lib/Latency.cpp
#include "Latency.h" #include "Assembler.h" #include "BenchmarkRunner.h" #include "MCInstrDescView.h" #include "PerfHelper.h" #include "Target.h" #include "llvm/ADT/STLExtras.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCInstBuilder.h" #include "llvm/Support/FormatVariadic.h" namespace llvm { namespace exegesis ...
TOOL
0.872483
7.911713
d8afc995-6e7a-43b8-b3c8-6da2db5c2f54
Takiwa-i/Atcoder
ABC/164/A.cpp
#include <iostream> int main(void) { int s, w; std::cin >> s >> w; if (w >= s) std::cout << "unsafe\n"; else std::cout << "safe\n"; return (0); }
TOOL
0.974317
4.059345
1d4b217c-d995-4ca9-a1ac-2cd3393d61c1
Tobiewe/TAIS
ej3/03.cpp
/*@ <answer> * * Nombre y Apellidos: * *@ </answer> */ #include <iostream> #include <fstream> #include <queue> using namespace std; /*@ <answer> Escribe aqu un comentario general sobre la solucin, explicando cmo se resuelve el problema y cul es el coste de la solucin, en funcin del tamao del problema. @ </...
ALGO
0.999855
4.464717
f6862978-3d9d-4e9a-8dfb-23e2c3f57b5b
Jev1337/AMS
AMS/libraries/opencv/sources/modules/videostab/src/inpainting.cpp
#include "precomp.hpp" #include <queue> #include "opencv2/videostab/inpainting.hpp" #include "opencv2/videostab/global_motion.hpp" #include "opencv2/videostab/fast_marching.hpp" #include "opencv2/videostab/ring_buffer.hpp" #include "opencv2/opencv_modules.hpp" namespace cv { namespace videostab { void InpaintingPipel...
TOOL
0.93658
6.250667
154948d6-a2e3-4678-b86c-6e0312eb715e
axxie/MouseImp
MImpPro/MImpCfg/MyListCtrl.cpp
/********************************************************************** MyListCtrl (alpha) **********************************************************************/ #include "stdafx.h" #include "MyListCtrl.h" #include "..\\SlibExc\\SLDbg.h" #include "resource.h" #include "AppConst.h" #ifdef _DEBUG #define new DEBUG_...
TOOL
0.963826
5.450601
d8aebb8f-8876-4066-a430-9be4a2000a25
merioye/DSA-Practice
2 - Arrays/11.cpp
// Given an array which consists of only 0, 1 and 2. Sort the array without // using any sorting algorithm. // Sample Input: 9 // 0 1 2 1 1 0 0 2 2 // Sample Output: 0 0 0 1 1 1 2 2 2 // Here, 9 is the size of array input by the user followed by the elements input #include<iostream> using namespace std; ...
ALGO
0.999744
5.20727
41122830-92c8-408d-9e1b-f2b5bc3be931
ojj1123/Algorithm2021_ver
17주차/13913_숨바꼭질4.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' const int sz = 100003; int n, k; vector<pair<int, int>> dist(sz, {-1, 0}); // {걸린 시간, 전 위치} vector<int> res; int bfs() { queue<int> q; dist[n] = {0, -1}; q.push(n); while (!q.empty()) { int cur = q.front(); q.pop(); if (dist[k].first != -1) r...
ALGO
0.999989
3.913743
51a3e182-1b06-4b52-b51f-20682b3a7d55
Reisim/Reisim
src/agent_perception.cpp
#include "agent.h" #include <QDebug> #ifdef _PERFORMANCE_CHECK_AGENT_PERCEPTION #include <windows.h> #endif void Agent::Perception( Agent** pAgent, int maxAgent, Road* pRoad, QList<TrafficSignal*> trafficSignal ) { cognitionCount++; if( cognitionCount >= cognitionCountMax ){ cognitionCount = 0; }...
ALGO
0.997645
3.318158
2d37cd2b-b4ce-4301-a5cc-f242379ffc5a
zhongchong7/opencalib
online_calib/vins_camera2imu/eigen3/test/sparseLM.cpp
#include "main.h" #include <Eigen/LevenbergMarquardt> using namespace std; using namespace Eigen; template <typename Scalar> struct sparseGaussianTest : SparseFunctor<Scalar, int> { typedef Matrix<Scalar,Dynamic,1> VectorType; typedef SparseFunctor<Scalar,int> Base; typedef typename Base::JacobianType JacobianT...
TEST
0.978639
6.154785
703d1bf2-f33f-436f-bff1-3bf0c4c86d0c
volhovm/pcms-labs
discrete_math/src/labs/mincost/mincost.cpp
#include <vector> #include <fstream> #include <iostream> #include <vector> #include <queue> #include <set> #include <algorithm> using namespace std; const int INF = 0xFFFFFFFF / 3; struct edge { int next, inv, flow, cap, cost; edge(int next, int inv, int cap, int cost) : next(next), inv(inv), flow(0), cap(c...
ALGO
0.999705
3.996417
ef924ab6-366d-4656-a975-8b130088c811
donationcoin-project/donationcoin
src/key.cpp
#include <openssl/ecdsa.h> #include <openssl/rand.h> #include <openssl/obj_mac.h> #include "key.h" // anonymous namespace with local implementation code (OpenSSL interaction) namespace { // Generate a private key from just the secret parameter int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key) { int ok =...
TOOL
0.976172
7.518869
08826186-b93b-4f1e-ad9d-a5033eb0422e
git-SayanGiri/2nd-Sem
Skew_Symmetric.cpp
#include<iostream> using namespace std; class matrix { int a[10][10], m, n, c = 0; public: void reads(); void skew_symmetric(); void display(); }; void matrix::reads() { cout << "Enter the row & column:\n"; cin >> m >> n; if (m != n) { cout << "Can't check Skew_Symmetric or not.\n...
ALGO
0.999651
3.801783
977d8a47-f11b-4963-8375-8e3b8fe8dc05
Bhawna751/LeetCode-Solutions
735-asteroid-collision/asteroid-collision.cpp
class Solution { public: vector<int> asteroidCollision(vector<int>& asteroids) { vector<int>st; for(int i=0;i<asteroids.size();i++){ if(asteroids[i] > 0)st.push_back(asteroids[i]); else{ while(!st.empty() && st.back() > 0 && st.back() < abs(asteroids[i])) st.p...
ALGO
0.999959
5.64686
a5fd385c-f989-4021-9ee2-f99f4fa44ec3
phlandscape/GitHub_Projects
C++/calculator/src/palindroms.cpp
#include <vector> #include <string> #include <sstream> #include <iostream> bool is_palindrome(const std::string& s) {// auto it = s.begin(); auto ed = s.begin()+s.size()-1; while(it!=ed) { if(*it++ != *ed--) { return false; } } return true; }// end of b is_palindrome(str) bool is_palindrom...
ALGO
0.999415
3.333174
874899b1-7a11-420e-b556-61beda29dab4
brendanbates89/project-euler
Problems/Problem10/Problem.cpp
/********************* * PROBLEM #10 *********************/ /* The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. */ #include <cstring> #include <stdio.h> #include "../AbstractProblem.h" #include "Problem.h" FACTORY(Problem10) Problem10::Problem10() { t...
ALGO
0.998582
5.268073
6cd601b9-675f-4372-97d9-e53469295b94
Abhinav-0103/DSA-CPP
27. Graphs/Depth First Search (DFS)/code.cpp
#include<iostream> #include<list> #include<vector> #include<queue> using namespace std; class Graph { int V; list<int>* l; public : Graph(int V) { this->V = V; l = new list<int> [V]; } void add_edge(int u, int v) { l[u].push_back(v); ...
ALGO
0.999849
5.501171
0f9cc030-f89f-42b1-9cd0-b25e62326e9c
abhishekpawl/dsa
LinkedList/reorderList.cpp
/* https://leetcode.com/problems/reorder-list/ */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ ...
ALGO
0.99996
6.017692
cb1e353f-80b0-4c1f-beac-6ca70d55af45
jeongminccc/algo
source/2352_반도체설계.cpp
using namespace std; int arr[40001], dp[40001]; int main(){ int N; cin >> N; for(int i=0; i<N; i++) cin >> arr[i]; int pos=1; dp[0] = arr[0]; for(int i=1; i<N; i++){ if(arr[i] > dp[pos-1]){ dp[pos] = arr[i]; pos++; }else{ auto it = lower...
ALGO
0.999991
4.232568
98f21c9f-3ed7-4629-b6b2-08f988c2c11a
sreiswig/CodingCompetitions
Google Code Jam 2022/Round 1B/P3.cpp
#include <iostream> int main() { int test_cases; std::cin >> test_cases; for (int test_case = 0; test_case < test_cases; test_case++) { std::cout << "01010101" << std::endl; int response = 1; int rounds = 0; while (response != 0 && response != -1) { std::cin >>...
ALGO
0.999546
5.195775
1f3dc889-bd3a-49bf-bd31-88df44f26da7
ilanvys/VirtualMemory
VirtualMemory.cpp
#include "VirtualMemory.h" #include "PhysicalMemory.h" word_t ceil(float num){ return (num - (word_t)num) == 0 ? (word_t) num : (word_t) (num + 1); } void unlinkChildFromTable(uint64_t parentFrameIndex, uint64_t childFrameIndex){ uint64_t startAddr = parentFrameIndex * PAGE_SIZE; word_t val; for (int ...
TOOL
0.978581
4.606947
2bb943e9-fadc-44c8-83fa-fd8777813546
AliRaouf/BoneVision
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998809
6.763549
c0d5ebf8-7105-4e57-ad71-2ea690d2c00a
Hasin-Ishrak/CodeFolio
vscode(c++)/spy detected.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; vector<int>v(n); for(int i=0;i<n;i++) { cin>>v[i]; } vector<int>a=v; sort(a.begin(),a.end()); for(int i=0;i<n;i++) ...
ALGO
0.999624
3.655066
f9c84740-5a1b-435d-9570-4e316ef43a60
GSGFs7/algorithm
codeforces/1974C Beautiful Triple Pairs.cpp
#include <algorithm> #include <array> #include <iostream> #include <limits> #include <map> #include <set> #include <unordered_map> #include <vector> using namespace std; /* 给出一个数组, 求有多少个连续的三个数中只有一个位置上的值不同 思路: 把有两个值相同的数全部放在一起, 排序后找有计算 */ // #define int long long typedef long long ll; typedef pair<int, int> p...
ALGO
0.999784
5.553653
1942a422-16a5-4e08-b957-240108ead7ca
Jung-jaewoo/codetree-TILs
240410/메이즈 러너/maze-runner.cpp
#include <iostream> #include <vector> #include <cstdlib> using namespace std; int N, M, K; int wall_map[11][11]; int update_map[11][11]; int per_posi[11][2]; bool per_exit[11]; int ex_x, ex_y; int dx[4] = {-1,1,0,0}; //상하좌우 순 int dy[4] = {0,0,-1,1}; int total_dist=0; void Input(); int GetDist(int idx); bool IsCanGo(...
ALGO
0.999842
4.590031
a847bdf9-1bcb-4e46-9156-6dbea36396b9
Sean95164/CP
USACOGuide/Silver/3_Graphs/GraphTraversal/Moocast/moocast.cpp
#include <bits/stdc++.h> using namespace std; map<int, vector<int>> gr; bool connected(const vector<int> &n1, const vector<int> &n2) { long long dx = n1[0] - n2[0]; long long dy = n1[1] - n2[1]; long long dist = dx*dx + dy*dy; return n1[2]*n1[2] >= dist; } int dfs(int cur, vector<bool> &visited) { ...
ALGO
0.999835
4.238401
b53e343a-85c3-44cb-8b05-a69ecf6748db
0206neha/Programing
Binary tree/Vertical_order_traversal.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; Node(int val) { data = val; left = NULL; right = NULL; } }; void verticalTraversal(Node *root) { if(root==NULL)return; map<int,vector<int>>mp; queue...
ALGO
0.999998
4.616354
ef44ef22-5f5a-4d13-9bbc-778083d0b5f6
ishandutta2007/codeforces
burnoutag7/normal/1144/A.cpp
#include<bits/stdc++.h> using namespace std; int n; string s; int a[30]; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin>>n; while(n--){ cin>>s; memset(a,0,sizeof(a)); if(s.size()>26){ cout<<"NO"<<endl; continue; } ...
ALGO
0.999983
4.237199
9ff6499d-d379-49a5-898b-2e2ce872aff6
varshhhy7/wayne-GFG
Difficulty: Easy/Segregate 0s and 1s/segregate-0s-and-1s.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: void segregate0and1(vector<int> &arr ) { int start =0 , end = arr.size()-1; while(start<end) { if...
ALGO
0.997279
6.214511
28ccff71-d6a4-4f3d-b4e2-debed50ccdee
popo9790/Basic_Program
program-2/mid-2/homework/13878-OFfood/13878.cpp
#include "function.h" #include <bits/stdc++.h> using namespace std; Meat meat[105]; Fruit fruit[105]; int meat_count, fruit_count; int get_index(string n, string k) { if (k == "fruit") { for (int i = 0; i < fruit_count; i++) { if (fruit[i] == n) return i; }...
ALGO
0.999546
4.70522
25255094-6c54-4ba5-9672-aab36b8ea0c0
hiro2233/ArdupilotMicro
libraries/AP_Math/vector3.cpp
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- #include "AP_Math.h" #define HALF_SQRT_2 0.70710678118654757f // rotate a vector by a standard rotation, attempting // to use the minimum number of floating point operations template <typename T> void Vector3<T>::rotate(enum Rotation rotat...
ALGO
0.880383
7.103314
97cd199a-43be-4799-a799-898d6a9ef946
aloksingh1818/My-geeksforGeeks-solution
Difficulty: Basic/Anshuman's Favourite Number/anshumans-favourite-number.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: string isValid(long long N){ // If N is divisible by 5 (whether positive or negative), return "Yes" if (abs(N) % 5 == 0) { ...
ALGO
0.999664
5.866222
71a986ec-a370-4b95-969a-b4e53ef6e496
praddyum/coding
Tree/BST_Creation.cpp
#include<bits/stdc++.h> using namespace std; struct node{ int data; node * left; node * right; }; node * createnode(int data){ node * newnode= new node(); newnode->data=data; newnode->left=NULL; newnode->right=NULL; return newnode; } node * insert(node * root,int data){ if(root==...
ALGO
0.999628
4.243641
eaae1b18-c5e8-480c-96dc-8121ce7d2e85
abc80486/codeBus
UVa1Ans/ch7/pp2.cpp
// 可重集的全排列 // Rujia Liu #include<cstdio> #include<algorithm> using namespace std; int P[100], A[100]; // 输出数组P中元素的全排列。数组P中可能有重复元素 void print_permutation(int n, int* P, int* A, int cur) { if(cur == n) {//数填满; for(int i = 0; i < n; i++) printf("%d ", A[i]);//输出; printf("\n"); } else for(int i = 0; i < n; i+...
ALGO
0.999974
3.943052
5b40b052-21b3-4c7a-85cd-20449536ff9c
jccarvalhosa/maratona
spojbr/luzespalco.cpp
#include <stdio.h> #include <vector> using namespace std; int L, B, soma; int luz[10000], vis[10000]; vector<int> grafo[10000]; void dfs(int v) { vis[v] = 1; if(luz[v]) soma++; for(int i=0;i<grafo[v].size();i++) if(!vis[grafo[v][i]]) dfs(grafo[v][i]); } int impossivel() { for(int i=0;i<L;i++) vis[i] = 0; for(i...
ALGO
0.999974
3.472833
0557e0df-8a83-468e-9b8a-59c85e62b683
ishandutta2007/codeforces
pwild/normal/508/A.cpp
#include <list> #include <map> #include <stack> #include <set> #include <sstream> #include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <cstdlib> #include <cstring> #include <climits> #include <cfloat> #include <numeric> #include <functional> #include <iomanip> #include <cassert> #include...
ALGO
0.999952
3.130811
214b4fd9-7c2a-4fc0-a1cc-ed265361679c
Codog808/School
ics212/212CodeExamples/Topic26/strings.cpp
/* Original program by Wes Peterson, modified by William Albritton C++ String function examples */ #include <iostream> #include <string> //C++ string library using namespace std; int main(){ //initialize a string string sentence = "This is a string."; // output a string cout<<"sentence = "<<senten...
TOOL
0.967626
4.789098
18ba194e-ec7e-49cd-86c6-9331879f3565
armitage420/leetIsLove
70-climbing-stairs/70-climbing-stairs.cpp
class Solution { public: int climbStairs(int n) { if(n <= 2) return n; int dp[n+1]; dp[0] = 0; dp[1] = 1; dp[2] = 2; for(int i = 3; i <= n; i++){ dp[i] = dp[i-1] + dp[i-2]; } return dp[n]; } };
ALGO
0.999964
6.176609
fe0a442b-d654-4a93-aa19-388258b9c55e
Mayurishinde27/Leetcode
2300-successful-pairs-of-spells-and-potions/2300-successful-pairs-of-spells-and-potions.cpp
class Solution { public: vector<int> successfulPairs(vector<int>& spells, vector<int>& potions, long long success) { vector<int>v; sort(potions.begin(),potions.end()); long long min; int count; for(int i = 0; i<spells.size(); i++) { min = ...
ALGO
0.999691
5.618977
47d2a0f7-8495-4432-bb5c-8dd3336f0719
evgurov/algo_prac
sprint_1/G.cpp
# include <iostream> # include <fstream> # include <string> # include <stack> std::string to_binary(int n){ if (n == 0){ return "0"; } std::stack<char> my_stack; char res; while (n != 0){ res = n % 2; my_stack.push(res + '0'); n = n / 2; } std::string binary;...
ALGO
0.999922
5.75936
a5f80aaf-0d40-4906-b0e2-7066fb58a1f7
cosarara/vba-sdl-h
src/unzip.cpp
/* unzip.c -- IO on .zip files using zlib Version 0.15 beta, Mar 19th, 1998, Read unzip.h for more info */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include "zlib.h" #include "unzip.h" #ifdef STDC # include <stddef.h> # include <string.h> # include <stdlib.h> #endif #ifdef NO_ERRNO_H e...
TOOL
0.979835
5.537796
430e2184-cf08-4c7f-b63a-03ecf4e6962d
MATCHA-MIT/Oreo-gem5
src/systemc/tests/systemc/misc/semantic/2.3/T_2_3_1_5_neg/T_2_3_1_5_neg.cpp
/***************************************************************************** T_2_3_1_5_neg.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**********************************************************************...
ALGO
0.973493
3.188989
d975ec1a-4c17-4dfe-aa7f-483112d1b10f
AlexandriaChemistry/ACT
src/act/alexandria/devcomputer.cpp
/*! \internal \brief * Implements part of the alexandria program. * \author Mohammad Mehdi Ghahremanpour <<EMAIL>> * \author David van der Spoel <<EMAIL>> * \author Julian Ramon Marrades Furquet <<EMAIL>> * \author Oskar Tegby <<EMAIL>> */ #include "devcomputer.h" #include <map> #include <numeric> #include <stri...
ALGO
0.990439
6.465977
dfc87261-ffc8-4a40-8a8c-6d49f457d1f7
CheezBoiger/Recluse-Game
Engine/Core/Private/Math/Vector2.cpp
namespace Recluse { Vector2 Vector2::lerp(const Vector2& a, const Vector2& b, R32 t) { return a * (1.0f - t) + b * t; } Vector2 Vector2::minimum(const Vector2& a, const Vector2& b) { return Vector2( b.x < a.x ? b.x : a.y, b.y < a.y ? b.y : a.y ); } Vector2 Vector2::maximum(const Vector2& a, const Vecto...
TOOL
0.903025
6.957283
42802f91-863d-4473-9cf3-6282f9257294
ahmedmamdouh886/codeforces-solutions
suffix_three.cpp
#include <iostream> #include <vector> using namespace std; string getLastChars(string s, int n) { return s.substr(s.length() - n); } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, length; string t, result; vector<string> vec; cin >> n; while (n--) { cin >> t; ...
ALGO
0.989355
4.557324
9fb6912d-0d38-4f8a-b3ff-acfe68c90c3b
eariunbayar/comp-programming
cf-352-a.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; int five = 0, zero = 0; cin >> t; while(t--){ int q; cin>>q; if(q==5)five++; if(q==0)zero++; } if(zero == 0) { cout << -1; return 0; } if(five >= 9) { for(int i = ...
ALGO
0.999831
4.380861
de512169-f753-4636-8ffd-312171baa24d
jeff-jae-lee/meshAfterParty
docker/CGAL/cgal_skeleton_param/skeleton_param_module.cpp
//added for the python module version #include "skeleton_param_module.hpp" #include <Python.h> //added comment to start rebuild #define CGAL_EIGEN3_ENABLED #include <CGAL/Simple_cartesian.h> #include <CGAL/Polyhedron_3.h> #include <CGAL/extract_mean_curvature_flow_skeleton.h> #include <CGAL/boost/graph/split_graph_into...
ALGO
0.956141
5.896463
6c2063a0-01a6-453d-a528-6f34e5504efa
NctimeAza/AnimeGame-Cheat-3.3
cheat-library/src/user/cheat/ILPatternScanner.cpp
#include <pch-il2cpp.h> #include "ILPatternScanner.h" #include <psapi.h> #include <cheat-base/util.h> #include <fmt/format.h> #include <helpers.h> #define SET_API_FUNC(r, n, p) \ { \ auto address = GetProcAddress(hMono, #n); \ if (...
TOOL
0.871745
5.563387
52339109-f5e6-468f-81e5-fc1614b71fcd
G3rkul3s/MultiLeap-Computer-Animation-Lab
eigen-3.4.0/test/sparseLM.cpp
#include "main.h" #include <Eigen/LevenbergMarquardt> using namespace std; using namespace Eigen; template <typename Scalar> struct sparseGaussianTest : SparseFunctor<Scalar, int> { typedef Matrix<Scalar,Dynamic,1> VectorType; typedef SparseFunctor<Scalar,int> Base; typedef typename Base::JacobianType JacobianT...
TEST
0.946417
6.18277
075cf03b-f5d5-4c4c-a27b-5bb48b6aa6f1
yitati/LCProject
Leetcode/HammingDistance.cpp
/******************************************************************************/ /* * Question: #461 Hamming Distance * The Hamming distance between two integers is the number of positions at which the corresponding bits are different. * Given two integers x and y, calculate the Hamming distance. * Note: * 0 ≤ x, y < 2...
ALGO
0.999884
5.507849
6902813c-5272-4750-822c-c99a600d7519
ArjunParajuli/DSA
Recursion/fibonacci.cpp
#include<iostream> #include<vector> using namespace std; // space O(2^n) int recFib(int n){ if(n<=1) return n; return recFib(n-2)+recFib(n-1); } int fib(int n){ if(n<=1) return n; int a=0, b=1; int c=-1; for(int i=0;i<n-2;i++){ c = a+b; a = b; b = c; } return c;...
ALGO
0.999993
4.856306
96c3dd31-38b8-4ce6-a965-b522e9bf0865
Anshika-Jain/DataStructureCodes_Java
Search and Sort/Value equal to index value.cpp
vector<int> valueEqualToIndex(int arr[], int n) { vector<int> v; for(int i = 1 ; i <= n ; i++){ if(arr[i-1] == i){ v.push_back(i); } } return v; } //For Input: 5 15 2 45 12 7 //your output is: 2 //For Input: 5 15 21 45 12 7 //your output is: Not Found
ALGO
0.999949
4.193982
8a8f7222-9965-4d38-a64e-b69d594dd600
vylhart/LeetCodes
100-same-tree/100-same-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99996
6.254904
42285341-a167-41a7-9078-1860c4711878
davenguyen19/Data-Structures
SortingAlg.cpp
#include <iostream> #include <string> using namespace std; void selectionSort(int a[], int length) { int minIndex, minValue; //outer loop to traverse through the whole array for (int startScan = 0; startScan < length - 1; startScan++) { //begin each iteration, assuming current element is the smallest remaini...
ALGO
0.999749
4.59571