uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
6146b4b3-2513-4ff0-8ef0-d66d85f03b0b
7oSkaaa/LeetCode_DailyChallenge_2023
01- January/29- LFU Cache/29- LFU Cache (Ahmed Gamal).cpp
// Author: <NAME> class LFUCache { public: // we are going to use a vector to store the value of each key, and a vector to store the frequency of each key (the number of times the key is accessed) // we are going to use a priority queue to store the keys in sorted order according to the frequency of the keys ...
ALGO
0.999896
6.053951
{ "github_metadata": { "branch": "main", "commit_count": 6874, "repo_created_at": "2023-01-02T11:28:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 104, "forks": 86, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c42c0f...
fa456d01-d5d6-4989-97bd-922fb85585d9
HungChun-Wang/LeetCode
C++/40.combination-sum-ii.cpp
/* * @lc app=leetcode id=40 lang=cpp * * [40] Combination Sum II */ #include <vector> #include <algorithm> using namespace std; // @lc code=start class Solution { // backtracking, time O(2^n), space O(n?) public: vector<vector<int>> combinationSum2(vector<int>& candidates, int target) { sort(candidat...
ALGO
0.99999
6.635046
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2021-08-06T06:35:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a74971b838b...
3c8f97e2-bfbc-4b38-a800-6522f815d0bf
Luomu/starshatter-open
Stars45/StarshipAI.cpp
/* Starshatter OpenSource Distribution Copyright (c) 1997-2004, Destroyer Studios LLC. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain t...
ALGO
0.944667
4.465857
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2015-03-26T14:53:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 22, "pull_requests": 0 }, "file_meta": { "content_id": "ffb6448...
327058a0-7161-4b52-b780-1ee42f139ec9
Rayyan-2704/OOP
OOP Assignment 1/Question4.cpp
/* Class Diagrams for Question 4: (Excluding getters and setters as the class diagrams were becoming way too long) +---------------------+ | Student | +---------------------+ | - studentID: string | | - studentName: string| | - feesPaid: bool | | - cardActive: bool | | - stopName: string | +-----------...
TOOL
0.925926
5.625993
{ "github_metadata": { "branch": "main", "commit_count": 240, "repo_created_at": "2025-01-20T14:27:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2dca1fc3a5...
4758c7a0-d94f-4f7a-bbd8-341a4b8ad13e
jonathandarryl/UVa-Code
871.cpp
#include<iostream> #include<string.h> using namespace std; char str[27][27]; int dr[] = {1,1,0,-1,-1,0,1}; int dc[] = {0,1,1,1,0,-1,-1,-1}; int count; int floodfill(int, int, char, char); int main(void){ int test; cin>>test; string input; int counter, max, temp; getline(cin,input); getline(cin,i...
ALGO
0.999849
4.279778
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-12-09T03:51:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d688c0141...
ec7733a0-5661-4648-b4bc-5027be09a7b7
murach/cp3
Ue11/main.cpp
#include <iostream> #include <iomanip> #include <stdlib.h> #include <math.h> #include <stdio.h> #include <omp.h> #include "frng.h" using std::string; using std::cout; using std::cerr; using std::endl; using std::setw; typedef int INT; typedef double REAL; void geom_vec(); inline double p(double phi_re, double phi_i...
ALGO
0.999541
3.416594
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2011-05-10T23:43:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "595895efd...
02ccfaec-0c8e-4f83-ad2f-5a856337ee98
locshade/mylt
MedianOfTwoSortedArrays.cpp
/*** * @author: locshade * @time : 2015/10/17 * ***/ /************************************ The question description: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). ************************...
ALGO
0.99999
5.294434
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-10-17T00:47:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26608f6c1...
463b10c3-6ea4-49be-a717-8e8e2eab68e3
adeyCU/MiniGitProject
app_1/main_1.cpp
#include <iostream> #include "../code_1/miniGit.hpp" #include <filesystem> using namespace std; /* * Purpose; displays a menu with options */ // oOoOoOoOoOo READ MEEEEEEE, this was done really late and I have no clue what half of this does, so REVIEEEEW MEEEEE void displayMenu() { cout << "Select a numerical op...
TOOL
0.929939
5.344113
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-01-03T00:09:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "899e741ba...
3baafd2b-a812-482a-b499-68165c6ce683
khangmoihocit/DSA
TH_HOU/7_stack/DSA07001.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node* pLink; }; typedef Node* STACK; void Initialize(STACK &stack) { stack = NULL; } Node* CreateNode(int d) { Node* pNode = new Node; pNode->data = d; pNode->pLink = NULL; return pNode; } void Push(STACK &stack, int ...
ALGO
0.998473
4.945956
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-09-06T01:03:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a38c95480c5...
f055d3a2-a4f5-4bcb-be8b-021d5e0568b9
gaurav-76/CPP
Number Theory/UpperCaseLowerCase.cpp
#include<bits/stdc++.h> using namespace std; void printBinary(int num){ for(int i = 10; i >= 0; --i){ cout << ((num >> i) & 1); } cout << endl; } int main(){ for(char c = 'A'; c <= 'E'; ++c){ cout << c << " : "; printBinary(c); } for(char c = 'a'; c <= 'e'; ++c){...
ALGO
0.99883
3.906234
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-02-09T06:31:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "561c852e8857...
78e63c28-36d6-461a-bcdf-2deda10a0ad8
OpenTTD/OpenTTD-Deprecated
src/core/math_func.cpp
/* $Id$ */ /* * This file is part of OpenTTD. * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without...
ALGO
0.996827
7.477239
{ "github_metadata": { "branch": "master", "commit_count": 22771, "repo_created_at": "2013-07-24T10:19:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 181, "forks": 32, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b068...
e765aab7-c702-4b0e-b9eb-733604f68c06
lichenk/AlgorithmContest
topcoder/SkiResorts.cpp
#include <bits/stdc++.h> #include <assert.h> using namespace std; typedef long long ll; typedef long double ld; #define PB push_back #define MP make_pair const ll MOD = 1000000007LL; const ll INF = 1ULL<<60ULL; const ll UNDEF = -1; template<typename T> inline bool chkmax(T &a, T b) { return a < b ? a = b, true : false;...
ALGO
0.999916
4.106821
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2018-07-29T03:21:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de502bf60...
3ecb1a83-1864-4fa7-bb21-b4192dfb5065
AanyaPanigrahi/Cpp_codes
29ptrarithmetic.c++
//pointer arithmetic #include <iostream> using namespace std; int main(){ int a=2; double b=2.2; int *pa=&a; double *pb=&b; cout<<pa<<" "; //increment->right shift in memory location cout<<(pa+1)<<" "; //decrement->left shift in memory location cout<<(pa-1)<<endl; //shifting dep...
ALGO
0.966414
3.813572
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2023-06-25T08:19:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cdb932290b7...
78b7dd72-4465-483d-b499-f529aa445228
mr-jestin-roy/LeetCode-TaskList
Codeforces-Daily-Virtual Contests/Codeforces Round #725 (Div. 3)/Another Problem About Dividing Numbers.cpp
// Created by <NAME> #include <bits/stdc++.h> using namespace std; #define mod 1000000007 // #define ll long long #define pb push_back #define all(v) v.begin(), v.end() #define sz(a) (ll) a.size() // #define int long long int #define fast ios_base::sync_with_stdio(false), cin.tie(NULL) #define PI 3.1415926535897932384...
ALGO
0.999938
4.634167
{ "github_metadata": { "branch": "master", "commit_count": 926, "repo_created_at": "2020-09-30T16:24:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2b440222...
42fb05d9-59cc-465b-93a5-19566fcdaf7c
horatiu-udrea/Lab5-DSA
SecondPriorityQueue.cpp
#include <bits/exception.h> #include "SecondPriorityQueue.h" #define DEFAULT_CAPACITY 10 SecondPriorityQueue::SecondPriorityQueue(Relation r) : relation{r} { heap = new Element[DEFAULT_CAPACITY]; size = 0; capacity = DEFAULT_CAPACITY; firstElement = {}; hasFirstElement = false; } void SecondPrio...
ALGO
0.976557
5.826873
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-04-15T14:37:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe899c3b38...
f6477efe-6a4e-4a30-8157-0679fe8bea6b
JanKrzemien/University
AlgorithmsAndDataStructures/drzewoSplay.cpp
typedef struct node Node; struct node { int val; Node * left; Node * right; Node * parent; }; class Splay { public: Node * root; void create() { root = nullptr; } void rotateLeft(Node * node) { Node * parent = node->parent; node->parent = parent->parent; ...
ALGO
0.999986
4.449638
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-05-11T13:53:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f2a315df23c...
2f8c375b-a505-42b0-bf5a-23f34b6f7013
raincross7/code-similarity
codes/train_code/problem324/problem324_332.cpp
#include <iostream> #include <cstdint> #include <cstdio> #include <algorithm> #include <cmath> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> #include <cctype> #include <cassert> #include <climits> #include <string> #include <bitset> #include <cfloat> #include <unorder...
ALGO
0.999967
4.111926
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "751c1d939847...
40e0f867-fb1a-4a48-8887-4cf83bb80a49
vaibhavnirmal2001/DSA-problems
51-n-queens/51-n-queens.cpp
class Solution { public: // bool isSafe(int row,int col,vector<string> & board,int n) // { // for(int i=0;i<col;i++) // { // if(board[row][i] == 'Q')return false; // } // int tempr = row; // int tempc = col; // while(tempr>=0 && tempc...
ALGO
0.99997
5.81046
{ "github_metadata": { "branch": "main", "commit_count": 270, "repo_created_at": "2022-09-28T04:18:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 55, "issues": 16, "pull_requests": 4 }, "file_meta": { "content_id": "cb8ec5b...
fa9f7153-4507-4453-bb1e-df823b411de6
somyeong0623/Algorithm
SWEA/D3/10059_유효기간.cpp
//10059. 유효기간 #include <iostream> #include <string> using namespace std; int TC; string answer; int main() { cin >> TC; for (int t = 1; t <= TC; t++) { answer = ""; string s; cin >> s; string first = s.substr(0, 2); string second = ""; second += s.substr(2, 4); int first_num = 0; first_num = stoi(...
ALGO
0.996127
4.683244
{ "github_metadata": { "branch": "main", "commit_count": 172, "repo_created_at": "2021-08-03T12:30:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "52a3c8ca5f...
fd07e8d6-84a7-4a0d-9c2e-2b3bba7341c2
shurikkuzmin/LatticeBoltzmannMethod
ImmersedBoundary/Figures/Benchmarks/steady_cylinder.cpp
#include <iostream> #include <fstream> #include <sstream> #include <cmath> //Domain size int NX,NY,NUM; //Time steps int N=100000; int NOUTPUT=1000; int NSIGNAL=1000; //Other constants const int NPOP=9; const double rho_wall=0.5; double force_x=0.0; double force_y=0.0; //BGK relaxation parameter double vel_cente...
ALGO
0.999933
3.745358
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-04-15T03:45:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 105, "forks": 47, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ea5d07...
d9ef0ba8-f0a0-467b-9453-ada38004a4f2
ianstecos/CIS142
MINDTAP/Unit-2/2-5/main.cpp
/* Programming Exercise 2-5 Author: <NAME> Instructions Consider the following C++ program in which the statements are in the incorrect order. Rearrange the statements so that it prompts the user to input the radius of a circle and outputs the area and circumference of the circle. #include <iostream> { int main...
ALGO
0.980219
5.614812
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2022-09-16T23:12:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ebfb63e001...
f9b0c240-c8ab-40bf-a894-f04d3ee642cd
Taejin1221/Problem-Solving
Baekjoon/Baekjoon20546.cpp
// Baekjoon20546_MiracleTrading.cpp // https://www.acmicpc.net/problem/20546 // IUPC G #include <iostream> using namespace std; int main(void) { int cash; cin >> cash; int stockPrices[14]; for ( int i = 0; i < 14; i++ ) cin >> stockPrices[i]; int aCash = cash, aStock = 0; int bCash = cash, bStock = 0; for...
ALGO
0.999939
3.973594
{ "github_metadata": { "branch": "master", "commit_count": 1156, "repo_created_at": "2019-10-06T05:54:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ba7bc2...
5ab5ae20-d504-4acf-a294-c686dfc84e24
Tarrasch/BabuschkaEngine
eval.cpp
//#include "../../generella/engine.h" #include "engine.h" #include <algorithm> const int MAXSUM = 1; int f_sfc[8]={3,2,1,0,0,1,2,3}; int sub_to_mirror[8]={0,0,0,0,1,3,5,7}; //atm bara summman av avståndet man gått (y-led) int compute_psq(const position_t *pos, const int side, const eval_params_t* p) { double summa=...
ALGO
0.999583
3.892949
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2011-10-29T10:26:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf7b657e41...
9ef433fe-b624-4cf2-bb15-6838bd185e92
ymd104/atcoder
abc128d.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(ll i=0; i<n; i++) typedef long long ll; ll mod = 1000000007; /* 操作 A: Dに詰められた宝石のうち、左端の宝石を取り出して手に入れる。 操作 B: Dに詰められた宝石のうち、右端の宝石を取り出して手に入れる。 操作 C: 持っている宝石を1つ選んでDの左端に詰める。 操作 D: 持っている宝石を1つ選んでDの右端に詰める。 操作AをA回、操作BをB回行うとする。捨てる操作はK-(A+B)回行える。 A,Bが決まると最適な捨てる回数は...
ALGO
0.999986
3.805954
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2019-08-28T12:38:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25fb626dd...
bf375ece-1394-401e-b268-d800f7fd8a30
InverseDa/SZU-Data-Structure
src/test16/A_DS_Sort_MergeSort_FeiDiGui.cpp
// // Created by inver on 2021/12/22. // #include <iostream> using namespace std; void print(string *arr, int len) { for (int i = 0; i < len; i++) { if (i != 0)cout << " "; cout << arr[i]; } cout << endl; } //非递归实现归并排序 void MergeSort(string arr[], int len) { //创建临时数组 string *temp...
ALGO
0.99993
5.741251
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-04-12T14:58:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01d23ed647...
61e4a13c-1889-4980-b60d-60323ed28156
kth496/Algorithm-study
algospot/7_2 FENCE/FENCE.cpp
#include <bits/stdc++.h> using namespace std; /* 3 7 7 1 5 9 6 7 3 7 1 4 4 4 4 1 1 4 1 8 2 2 */ vector<int> h(20000, 0); int solve(int left, int right) { if (left == right) return h[left]; int mid = (left + right) / 2; int ret = max(solve(left, mid), solve(mid + 1, right)); int lo = mid, hi = mid + 1; in...
ALGO
0.999846
4.060924
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2020-07-02T08:30:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbc02224...
757f0d4a-a572-449e-a94e-d4f7d5012324
caomw/recon
gfxmath/vectormath/include/vectormath/soa/load_store.h
/* The source file is part of vectormath Copyright (c) 2015 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, c...
TOOL
0.90763
6.14578
{ "github_metadata": { "branch": "voxel", "commit_count": 144, "repo_created_at": "2015-11-28T04:47:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83424aac8...
4439efd9-345f-4227-bbec-da241569e46b
orbitonlabs/fastsim
solvers/euler.h
#pragma once #include <functional> #include <valarray> #include <fstream> #include <cxxplot/cxxplot> #include "../lib/range.h" #include "../lib/types.h" #include "../solvers/newton_raphson.h" using std::valarray; using std::function; using util::lang::indices; static auto ode_fe(const valarray<vector_function_type>&...
ALGO
0.999518
6.020753
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2023-12-22T16:53:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a257827810...
a45041f1-c41c-43fe-a15f-78f8743ca3f0
Zhanghq8/Leetcode_notes
77_Combinations/submission2.cpp
#include <iostream> #include <string> #include <cmath> using namespace std; class Solution { public: vector<vector<int>> combine(int n, int k) { vector<vector<int>> result; vector<int> solution; helper(result, solution, n, k, 1); return result; } private: void helper(vector...
ALGO
0.999961
6.469133
{ "github_metadata": { "branch": "master", "commit_count": 687, "repo_created_at": "2019-03-09T04:46:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79b5ae17...
8666dc1c-fe07-4f12-a93a-b7c1d4470358
haiconmeo/MITM_A
nháp/thamlam.cpp
#include <stdio.h> #include <cstdlib> struct Item { int weight; int value; float density; }; void fractionalKnapsack(Item items[], int n, int W); int main(void) { //variables int i, j; Item items[50]; for (int i =0;i<50;i++){ items[i].value= rand()%100; items[i].weight=rand()%100; items[i].density=0...
ALGO
0.999687
3.937858
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-09-16T08:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b0cf7e42...
a42fb72e-cfcf-432e-8d43-063de168c349
jongmoochoi/irisfaceRGBD
IRIS 3D face modeling/IRIS3DFacemodeling_cuda8.0/src/Modeling.h
//----------------------------------------------------------------------------------------- // This file is part of the "USC IRIS 3D face modeler" // developed at the University of Southern California by // <NAME>, <NAME>, <NAME>, // Published: Laser Scan Quality 3-D Face Modeling Using a Low-Cost Dept...
ALGO
0.991967
5.103933
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2016-08-10T20:22:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 123, "forks": 42, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "d1f2be...
9f6c7862-b8ba-4baa-b58a-78ca15a13728
ajinoc/CS32-Project-4
Compressor.cpp
#include "provided.h" #include "HashTable.h" #include <string> #include <vector> using namespace std; void Compressor::compress(const string& s, vector<unsigned short>& numbers) { unsigned int capacity = s.length() / 2 + 512; if (capacity > 16384) capacity = 16384; HashTable<string, unsigned short> ht(capacity * 2,...
ALGO
0.999675
4.334696
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-03-21T16:14:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa1b98bab8...
24086d2c-fcd6-4f61-b900-09f8aaab525a
nickchen111/Leetcode
Greedy/3207. Maximum Points After Enemy Battles.cpp
/* 3207. Maximum Points After Enemy Battles */ // TC:O(nlgn) SC:O(1) class Solution { using LL = long long; public: long long maximumPoints(vector<int>& enemyEnergies, int currentEnergy) { LL res = 0; sort(enemyEnergies.begin(), enemyEnergies.end()); if(enemyEnergies[0] > currentEnergy...
ALGO
0.99995
4.64865
{ "github_metadata": { "branch": "main", "commit_count": 2388, "repo_created_at": "2023-08-16T05:31:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b24e959a4...
d3b01c88-e657-4fa6-9259-e899cd2affb3
Navdeepmaheshwari/DSA
SORTING/quickSort_Hoare.cpp
#include <bits/stdc++.h> using namespace std; int HPartition(int arr[], int low, int high) { int pivot = arr[low]; int i = low - 1, j = high + 1; while (true) { do { i++; } while (arr[i] < pivot); do { j--; } while (arr[j] > pivot...
ALGO
0.999989
5.615072
{ "github_metadata": { "branch": "master", "commit_count": 1660, "repo_created_at": "2022-05-15T10:47:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a57895...
541a85b6-e8bb-455f-ba44-85191c78b88c
MonicaIngham/SudokuSolver
SudokuSolver/Functions.h
//Written by <NAME> #pragma once #ifndef FUNCTIONS_H #define FUNCTIONS_H #include <vector> #include <string> using namespace std; vector<vector<int>> solveSudoku(vector<vector<int>>); //Main algorithm function int countRow(vector<vector<int>>, int); //Counts how many solved numbers are in a row int cou...
ALGO
0.99199
4.672873
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-29T02:08:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59f6816ddd25...
5d61361e-52e2-4d1f-aa26-fba7b55490fd
DaniilKochergin/15_game
15_game.cpp
// // Created by Danil on 02.05.2019. // #include <iostream> #include "15_game.h" Solver::Solver(Board const &a) { if (!a.is_solvable()) { throw std::runtime_error("Make class Solver from unsolvable board"); } start = a; solve(); } Solver::Solver(Solver const &a) { data = a.data; } void ...
ALGO
0.999601
5.358088
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-05-01T21:49:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80ae46c2db...
d048cbb9-71ec-4eeb-9150-fdfcb70c80d7
sharif7761/problem-solving-on-online-judge
uri/uri_1049.cpp
#include <iostream> using namespace std; int main() { string inputOne, inputTwo, inputThree, result; cin >> inputOne >> inputTwo >> inputThree; if(inputOne == "vertebrado"){ if(inputTwo == "ave"){ if(inputThree == "carnivoro"){ result = "aguia"; } ...
ALGO
0.987705
3.88794
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2022-01-22T07:22:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "246676bd...
53ac5caa-2e54-49a0-af3d-805e9546fd08
rachida-saroui/image-processing-cpp
cpp/Exo04.cpp
/*********************************************************************** Exo 4 Image, convolution et filtrage <NAME> ***********************************************************************/ #include "init.h" using namespace cv; using namespace std; void InitWindows(int Width, int Height) { // Creation de fenetres d...
TOOL
0.910423
4.353011
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-11-04T19:33:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e70991cddadd...
31b4296b-3d9f-4969-9184-8e1f0ecd6d67
shivamaggarwal513/coding-ninjas
Data Structures and Algorithms CPP/18 Priority Queues/03MaxPriorityQ.cpp
#include <iostream> #include <vector> #include <utility> #include <climits> using namespace std; class MaxPriorityQueue { private: vector<int> arr; int parentChildMax(int &pI) { int max = pI, lC = 2 * pI + 1, rC = 2 * pI + 2; if (lC < arr.size() && arr[lC] > arr[max]) max = lC;...
ALGO
0.999206
4.255399
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-12-09T14:49:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "002b5713547...
9c6ab6b0-633b-4f70-8e8b-7d6f3fb013cc
AhmedEssamYassin/Problem-Solving
Topic-based Training/Binary Search/String Game/Solution.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define endl "\n" bool isOk(string T, string P, const vector<int> &a, const ll &mid) { // Mark deleted characters (better than literally erasing, to maintain correct order of indices) for (int i{}; i < mid; i++) T[a[i]] = ' '; string subseque...
ALGO
0.999989
4.690038
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-05-02T14:49:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b157707ace5...
b603d52c-d67d-4285-9b96-7779a13c9a25
NanoNish/Compi-Prog
CSES/Intro/Two_Sets.cpp
#include <bits/stdc++.h> #define ll long long int #define loop(i,o,n,step) for(auto i{o}; i < n; i += step) using namespace std; int main(){ int n; cin >> n; if(n%4 == 1 || n%4 == 2){ cout << "NO" << "\n"; return 0; } vector<int> a, b; if(n&1){ a.push_back(n); lo...
ALGO
0.999672
3.163027
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2022-02-08T18:29:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a197b8380...
20c0d5d7-54c3-4f13-a515-fdff1b7888ca
iddev5/uni
dslab/day4/prog.cpp
#include <iostream> using namespace std; int get_precedence(char c) { switch (c) { case '*': case '/': return 10; case '+': case '-': return 5; default: return -1; } } class stack { int t; int *data; public: stack(int size) { t = -1; data = new int[size]; } void push(int d) { ...
ALGO
0.999707
5.003035
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-08-08T14:17:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65ef585520...
b3f88664-54cb-46b0-93e4-e173a5abec45
chen-yingfa/Bachelor
大二上/数据结构/hw/PA1/filename/filename.cpp
#include <iostream> #include <iomanip> #include <string> //usable using namespace std; int main(){ int maxN = 501000; int INF = 99; int dp[maxN + 1]; string a, b; int n, m, k; cin >> n >> m >> k; cin >> a >> b; for (int i = 0; i <= k; i++){ dp[i] = i; } dp[k+1] = INF; ...
ALGO
0.999937
3.338511
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-03-06T08:33:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49d1f8f58...
987ff32b-8115-46e6-90b6-df228c9df4e8
aryaVishal1706/Comprehensive-Data-Structures-and-Algorithms-in-C-
DSA in C++/STL_in_c.cpp
#include<iostream> #include<bits/stdc++.h> #include<vector> using namespace std; bool myCompare(pair<int,int> p1, pair<int,int> p2){ return p1.first < p2.first; } int main(){ // vector<int> v; // v.push_back(1); // v.push_back(2); // v.push_back(5); // for (int i = 0; i < v.size(); i...
ALGO
0.99994
4.271866
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-01-16T15:34:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2a13d5f92d7...
3db26fc7-4599-4b31-bb31-a9dd2b78ca29
Mohd-Ayan26/DSA-Diary
CodingSolution/DP(Dynamic Programming)/Minimum Cost Of Tickets.cpp
class Solution { public: //using memoization int solve(vector<int> &days,vector<int> &costs,int n,int index,vector<int> &dp) { if(index>=n) { return 0; } if(dp[index]!=-1) { return dp[index]; } int option1=costs[0]+solve(days,co...
ALGO
0.99953
5.226594
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2024-12-29T06:35:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb96cd37ca...
192568d3-89dd-4c16-90ed-0881f1902098
YTLogos/ggforce
src/bSpline.cpp
#include <Rcpp.h> #include "deBoor.h" using namespace Rcpp; std::vector<double> createKnots(int nControl, int degree) { int nKnots = nControl + degree + 1; std::vector<double> knots (nKnots, 0); for (int i = 0; i < nKnots; i++) { if (i < degree + 1) { knots[i] = 0; } else if (i...
ALGO
0.990322
5.478097
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2017-09-02T11:05:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14161920...
8dc93ae1-276e-4399-bdb1-6b635dac6276
zeas2/Kirikiroid2
src/core/tjs2/tjsHashSearch.h
//--------------------------------------------------------------------------- /* TJS2 Script Engine Copyright (C) 2000 W.Dee <<EMAIL>> and contributors See details of license at "license.txt" */ //--------------------------------------------------------------------------- // An Implementation of Hash Searching //--...
ALGO
0.997865
5.192601
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-12-24T13:26:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2703, "forks": 218, "issues": 126, "pull_requests": 1 }, "file_meta": { "content_id": "01...
b8b5f66e-c61c-4642-b21d-71b30cc3ea05
transfix/trans-vr
src/zzzzzUNUSEDzzzzz/multi_sdf/op.cpp
#include <multi_sdf/op.h> namespace multi_sdf { extern vector<double> bounding_box; void draw_ray(const Ray& ray, const double& r, const double& g, const double& b, const double& a, ofstream& fout) { fout << "{OFF" << endl; fout << "2 1 0" << endl; fout << r...
ALGO
0.978201
4.511865
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-05-02T20:41:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85c620dc59...
0a57eabf-7081-4a26-81e9-807cbf2b92c3
spirthack/CSGOSimple
CSGOSimple/valve_sdk/interfaces/IRenderView.hpp
#pragma once #include "../Math/QAngle.hpp" #include "../Math/Vector2D.hpp" #include "../Math/Vector4D.hpp" #include "../Math/VMatrix.hpp" //----------------------------------------------------------------------------- // Forward declarations //--------------------------------------------------------------------------...
TOOL
0.962954
6.298859
{ "github_metadata": { "branch": "master", "commit_count": 248, "repo_created_at": "2017-12-05T17:23:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 417, "forks": 151, "issues": 25, "pull_requests": 1 }, "file_meta": { "content_id": "ec28...
77f2ae13-1174-41b1-a692-bcd7f13b032d
Utkarsh-Arora-007/GFG-Self-Paced-Course
Gfg DSA Self Paced Course/Trees/15. Check for Balanced Binary Tree.cpp
// Naive Approach // Time Complexity: O(n^2) //becoz for each node there will be two recursion call in the recursion call stack : One will check is it balanced and other will tell you the level(height) of the node. #include<bits/stdc++.h> using namespace std; struct Node{ int key; struct Node *left; struc...
ALGO
0.999939
5.225507
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-01-05T20:29:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5ed73d7273e...
0a5ca81d-33c8-4540-abc4-7a1c1634d1c3
kingson1812/Application
Algorithm/Source/Algorithm.cpp
#include "Algorithm.h" #include <sstream> Algorithm* Algorithm::m_instance = NULL; bool Algorithm::ASC(const int & a, const int & b) const { return a > b; } bool Algorithm::DESC(const int & a, const int & b) const { return a < b; } const char * Algorithm::GetProcessData() { return m_process.c_str(); } Algorithm...
ALGO
0.999157
4.322043
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-06-29T17:10:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ddede7c0c...
5e205cdf-1cd2-4d85-9a21-b005ca255a07
Trung1234/AlgorithmExcercise
Simulation/10116.cpp
#include <iostream> #include <fstream> #include <math.h> #include <string.h> #include <stdio.h> #include <algorithm> using namespace std; struct toado { int hang; int cot; }; toado hg[4]={-1,0 // hg[0] ,0,1 // hg[1] ,1,0 // hg[2] ,0,-1}; // hg[3] toado cur; int nhang,ncot,cotxuatphat; char s[111][111]; int dem[111...
ALGO
0.999982
3.510858
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-11-19T05:05:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15d7564d2c...
96b134fb-f712-4faf-ad73-5dee81b2397d
cdh981009/Algorithm
baekjoon/23341.cpp
#include <bits/stdc++.h> using namespace std; #define INF (1e9 + 7) #define fi first #define se second #define rep(i, a, b) for (int i = (a); i < (b); ++i) #define rep_(i, a, b) for (int i = (a); i <= (b); ++i) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FOR_(i, a, b) for (int i = (a); i <= (b); ++i)...
ALGO
0.999975
4.779757
{ "github_metadata": { "branch": "master", "commit_count": 850, "repo_created_at": "2020-02-16T08:17:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb721abb...
39b1fbfb-8655-4eaa-8d17-e86be85a4ad5
micko-plz/adventofcode2019
day2/d2_2.cpp
#include <iostream> #include <fstream> #include <sstream> #include <vector> using namespace std; #include <chrono> int getOutput(vector<int> csv, const int& input1, const int& input2) { int num; int pos1; int pos2; int pos3; csv[1] = input1; csv[2] = input2; for (vector<int>::size_type j; j < csv.siz...
ALGO
0.997753
4.781425
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-12-01T17:32:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abd09d83a...
3c08e4cc-a475-4b3d-96b8-841e0e406b4d
tony9402/algorithm-solutions
solutions/baekjoon/14284/main.cpp
// Authored by : tony9402 // Co-authored by : - // Link : http://boj.kr/8c1a3a3c7634449398e61eb168a9e5c1 #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<pair<int, int>>> G(N + 1); for(int i = 0; i < M; ++i) ...
ALGO
0.999984
4.927399
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2024-01-28T12:45:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 14, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "6e4b24e50...
491959e7-a7ae-4749-8efe-45b18024f3f4
Bloonow/LeetCode
t31.cpp
#include <utility> using namespace std; // 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) {} }; // 25. K 个一组翻转链表 class Solution { pub...
ALGO
0.999972
5.909456
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2024-07-22T12:29:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cec175397...
df56c71b-ba9a-4609-a55f-9b54e0a14ef8
Ekanshsomani/Competitive-Programming-Solutions
UVa Online Judge/429 - Word Transformation.cpp
#include <bits/stdc++.h> #define ii pair<int, int> using namespace std; inline bool isDoublet(const string &a, const string &b) { if(a.length()!=b.length()) return false; int diff{0}; int l = a.size(); for(int i=0; i<l; i++) if(diff>1) break; else if(a[i]!=b[i]) ...
ALGO
0.999911
3.708208
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-02-27T21:38:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fa35b2f27d...
80f6eed6-282d-4553-82d1-cb4938bc275b
kamyu104/LintCode
C++/minimum-path-sum.cpp
// Time: O(m * n) // Space: O(min(m, n)) class Solution { public: /** * @param grid: a list of lists of integers. * @return: An integer, minimizes the sum of all numbers along its path */ int minPathSum(vector<vector<int>> &grid) { const int m = grid.size(); const int n = grid[0...
ALGO
0.999992
6.169149
{ "github_metadata": { "branch": "master", "commit_count": 1293, "repo_created_at": "2015-02-16T16:25:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 631, "forks": 261, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "003...
4d9eaf9f-a8b3-47c3-8ef2-81111ac80cfe
mmeka24/Cplusplus
hash/Main.cpp
#include <iostream> #include <fstream> #include <cstring> #include <iomanip> #include "Student.h" #include "Node.h" using namespace std; Node* head = NULL; void add(Node* newNode, Node* &head, Node* prev, Node* current); void rehash(int &bucketSize, Node **&hashTable); int ibucketSize = 100; int bucket...
TOOL
0.933468
3.989202
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2023-09-07T18:49:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90cefb389c3...
7f14c7f2-011b-48c0-b5a5-fb41429579b4
OrcusCZ/SVMbenchmark
gtSVM/lib/svm_gt.cpp
/* Copyright (C) 2011 <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope th...
TOOL
0.955002
6.359142
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2015-10-01T10:02:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "982b2980...
a49c65f8-c39a-4fa0-8ee7-d4364274368d
Blammuh/COSC1437
Module 9/Computation.cpp
#include <iostream> using namespace std; int product(int ProdNumber) { int ProductTotal = 1; for(int i = 1; i <= ProdNumber; ++i) { ProductTotal *= i; } return ProductTotal; } int sum(int SumNumber) { int NumberSum = 0; for(int i = 1; i <= SumNumber; ++i)...
ALGO
0.999334
4.464494
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-01-29T14:55:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34323645e013...
0b8e9f0c-3528-4e3e-a006-496c615a2e81
sagar-1m/LeetCode
0080-remove-duplicates-from-sorted-array-ii/0080-remove-duplicates-from-sorted-array-ii.cpp
class Solution { public: int removeDuplicates(vector<int>& nums) { if (nums.size() <= 2) return nums.size(); // If the array has 2 or fewer elements, all are valid. int j = 2; // Start j at index 2, because the first two elements are always valid. for (int i = 2; i < nums...
ALGO
0.99995
6.631603
{ "github_metadata": { "branch": "main", "commit_count": 1047, "repo_created_at": "2024-08-04T08:58:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a32df5d32...
2a7e3514-467d-4868-992b-907ec187af06
BrunoBucCcellati/TEST_AGP-Fixed-
FUNCTIONAL.cpp
#include <chrono> #include <cliext/deque> #include <cliext/utility> #include <queue> #include "Windows.h" #include "framework.h" #include "pch.h" enum List { Top, Dawn, Left, Right }; class Interval { private: std::pair<double, double> start, end; double M, R; public: Interval(std::pair<double, double> _start...
ALGO
0.998539
4.408664
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-11-24T21:12:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eaad1384f590...
7599e576-7f27-4564-b8c1-86f91a9273a2
MegaWuZ/Algorithm-and-Data-Structure
Heap/main.cpp
#include <iostream> #include<string> #include <algorithm> #include "Heap.h" #include "MergeSort.h" #include "QuickSort.h" #include "QuickSort2Ways.h" #include "QuickSort3Ways.h" #include "SortTestHelper.h" #include"HeapSort.h" using namespace std; template<typename Item> class IndexMaxHeap { private: Item* data; in...
ALGO
0.999629
4.057984
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-02-07T01:47:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85c65eadb...
ae611970-7bb4-4e4a-affe-dbaca3f823ca
MdAbuNafeeIbnaZahid/Competitive-Programming
Light OJ/Graph/BFS or DFS/1174 - Commandos .cpp
#include <bits/stdc++.h> using namespace std; #define INFINITY 9999999 #define SIZE 109 //const int INFINITY = (unsigned)(~0) >> 1; int t, n, r, u, v, s, d, a, b, c, i, j, k,x, y, z, maxD, maxS, maxDist; vector<int> g[SIZE]; int distD[SIZE], distS[SIZE]; queue<int> q; void bfs(int source, int *ar) { q = queue<i...
ALGO
0.999608
3.902031
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2017-03-04T13:09:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca3e1eae5...
00869b61-2beb-4784-8627-452c2bafe6d9
victxrrr/tws_sesh6
question1.cpp
#include <algorithm> #include <iostream> #include <iomanip> #include <numeric> #include <random> #include <vector> #include <cassert> #include <chrono> #include "library.hpp" int main(int argc, char* argv[]){ assert(argc==4); int n = atoi(argv[1]); int nb_runs = atoi(argv[2]); int nb_warm_up = atoi(arg...
ALGO
0.982652
4.782503
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-04T20:24:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8350d2eef15...
369a83b8-4d2f-4aca-9824-d7d7d63815b3
ReshuKumari/leetcode
Water Connection Problem - GFG/water-connection-problem.cpp
// { Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: pair<int,int> dfs(int index, vector<pair<int,int>> adj[], int mini) { if(adj[index].size()==0) return {index,mini}; else { for(int i=0; i<adj[ind...
ALGO
0.999919
5.557052
{ "github_metadata": { "branch": "main", "commit_count": 725, "repo_created_at": "2022-03-29T17:41:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c62fee5f1...
f99da409-8620-4cf4-a659-e3547aa67802
enfmarinho/CSES-Problem-Set
Introductory Problems/Creating Strings/Creating Strings.cpp
// Problem: Creating Strings // Contest: CSES Problem Set // Judge: CSES // URL: https://cses.fi/problemset/task/1622 // Memory Limit: 512 // Time Limit: 1000 // Start: 09/12/2023 22:25 #include <iostream> #include <set> #include <string> #include <tuple> #include <utility> #include <vector> #define ll long long #defi...
ALGO
0.999954
5.701437
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2023-11-07T00:53:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e204ade37...
709b8d34-29a0-4f44-b828-98c48444df01
Henrik-Yao/NEUQ-ACM-Solution
winter-day3/唐元凯/7-5.cpp
#include<iostream> #include<algorithm> using namespace std; const int maxn = 1e4 + 5; int u[maxn], v[maxn], c[maxn],p[maxn],r[maxn]; int n, m; int find(int x) { return p[x] == x ? x : p[x] = find(p[x]); } int Kruskal() { int ans = 0; for (int i = 0; i < n; i++)p[i] = i; for (int i = 0; i < m; i++)r[i] = i; sort(r...
ALGO
0.99993
3.929456
{ "github_metadata": { "branch": "main", "commit_count": 3351, "repo_created_at": "2021-10-15T10:01:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 62, "issues": 0, "pull_requests": 42 }, "file_meta": { "content_id": "02a9d3...
01015d67-786f-465b-bd78-4765a697d88d
mouparnadebnath/CPlusPlus-DSA
patterns/12.cpp
// print butterfly #include <iostream> using namespace std; int main() { int n; cin >> n; for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { cout << "*"; /* code */ } int space = 2 * n - 2 * i; for (int j = 1; j <= space; j++) ...
ALGO
0.999994
3.934597
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-09-08T08:31:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5050709fe72...
b80ae78d-1f38-419b-9df7-ea74ff3a353a
ptt743/atcoder
problems/abc304_e.cpp
#include<iostream> #include<vector> #include<algorithm> #include<string> #include<queue> #include<stack> #include <atcoder/all> #include<set> #include<map> using namespace std; using namespace atcoder; //*****taipt*****// using mint = modint998244353; vector<int> parent; int getparent(int u){ while(u!=parent[u]) u =...
ALGO
0.999923
5.047858
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2023-04-15T14:14:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de9517baecf...
3be30963-26b7-4024-bf69-e155abfdfabc
wuxibin89/tiger
chap1/prog1.cc
#include "prog1.h" #include <stdio.h> #include <string.h> #include <vector> #include "slp.h" #include "util.h" A_stm prog(void) { return A_CompoundStm( A_AssignStm("a", A_OpExp(A_NumExp(5), A_plus, A_NumExp(3))), A_CompoundStm( A_AssignStm("b", A_EseqExp(A_PrintStm(A_Pa...
ALGO
0.933131
3.956789
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-01-27T15:34:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0538227fe...
d175b236-9ea6-4365-99db-f4c1ba6a13c3
rrajnidhi/1D_kalman_Multiple_SR04_function
1D_kalman_as_function.ino
#define echoPinA 2 #define trigPinA 3 #define echoPinB 4 #define trigPinB 5 long duration; float distance; // kalman variables float R = 2.92E-03; // measuement variance; determined using excel and reading samples of raw sensor data which is constant float Q = 1e-4; //arbitaryly determined for this case. -5,-7(no...
ALGO
0.906057
4.802421
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-07-19T07:53:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e8591de16...
bfd10fba-f291-4f1f-810d-792afa06ed23
BeastHoo/profit-calc
利润对比计算器/利润计算器.cpp
//@author Hyq //Version 1.0 //date 20/5/12 #include"user.h" #define M 10 #define _CRT_SECURE_NO_WARNINGS void gotoxy(int x, int y) { COORD coord; coord.X = x; coord.Y = y; HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorPosition(handle, coord); } /************************************************...
ALGO
0.974653
3.27836
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-13T06:07:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00ace43725...
1478f103-ab46-4adf-ba85-3114dc040640
SageCT/COSC3360
NOTES/2023.05.01 EXAM2 Prep/reverseOrder.cpp
//reverse order #include <pthread.h> #include <iostream> #include <string.h> #include <stdlib.h> #include <fcntl.h> using namespace std; static pthread_mutex_t bsem; static pthread_cond_t waitTurn = PTHREAD_COND_INITIALIZER; static int turn; static int nthreads; /* I am Thread 4 I am Thread 3 I am Thread 2 I am Threa...
ALGO
0.997616
4.249616
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2022-12-17T06:31:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d63cbc5326...
d93bec78-98d8-4101-9838-a005efdc5c6b
Jagadhish3/CompetitveProgramming
Linear_dp/string_input2.cpp
#include<iostream> #include<vector> using namespace std; int main(){ string s = "{{1,2},{3,4}}"; string s1 = ""; vector<vector<int>> vec; vector<int> temp; // Temporary vector to store individual inner lists for(char ch : s){ if(ch == '{'){ // Ignore the opening curly bra...
ALGO
0.997324
4.843252
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2024-09-17T13:52:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "edad523ca...
e631de10-a83d-44ad-b7c2-9cb927678b4c
hitlar240/Code
Phitron-DSA/W06-BST-from-Array.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node* left; Node* right; Node(int val) { this->val = val; left = NULL; right = NULL; } }; Node* construct(int a[], int l, int r) { if(l>r) return NULL; int mid = (l+r)/2; Node* r...
ALGO
0.999996
4.837784
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2023-05-22T09:19:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6f9d4ddc0...
a99d5f87-cbf5-4703-87d9-c2f5c1235db8
vishal1patidar/Practice-DSA
706-design-hashmap/706-design-hashmap.cpp
class MyHashMap { vector<list<pair<int,int>>> m_data; size_t m_size = 10000; public: /** Initialize your data structure here. */ MyHashMap() { m_data.resize(m_size); } /** value will always be non-negative. */ void put(int key, int value) { auto &list = m_data[key % m_si...
ALGO
0.999309
5.986012
{ "github_metadata": { "branch": "main", "commit_count": 1865, "repo_created_at": "2021-10-06T04:24:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c87f5633...
8561fee0-9471-4c41-b63b-ba19f08ef743
ivangalbans/leetcode
src/3011.cpp
// https://leetcode.com/problems/find-if-array-can-be-sorted/description/ class Solution { public: bool canSortArray(vector<int> &nums) { int n = nums.size(); vector<pair<int, int>> seg; int l = 0, r = 0; while (l < n) { while (r < n && __builtin_popcount(num...
ALGO
0.999989
5.706135
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2022-02-19T17:50:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86430707...
0666d6e1-c34c-452a-a04e-3cdb64a5d5c7
jmg217/maxwell_dev
cuda_dir/CUDA_Implementation_of_the_Stochastic_Mesh_Method/Thesis_Code/pathestimator.cpp
#include <iostream> #include <math.h> #include <ctime> #include <cmath> #include <stdlib.h> #include <fstream> #include <vector> #include <random> #include "Payoff.h" #include "enum_header.h" //declare transition density function. This is contained in meshgen.cpp double density(double Xold, double Xnew, double si...
ALGO
0.999853
3.271875
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-05-26T00:00:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30e0bbf46...
3fec3a83-778f-46f2-b88d-5295f3b30edd
cecil0812/CodingChallenges
MergeSort/Source.cpp
#include <iostream> #include <vector> using namespace std; void mergeSort(vector<int>& data, size_t lower, size_t upper); void merge(vector<int>& data, size_t lower, size_t middle, size_t upper); template <class T> void printVector(const vector<T>& v); int main(int argc, char* argv[]) { vector<int> data{ 38, 27, ...
ALGO
0.99999
5.731292
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-10-19T22:35:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a66bc4aec...
e54b0891-953e-4ced-9fa3-3ffbf242ae8f
lilybcreaghan/COEN244Assignment
Edge.cpp
/* * Edge.cpp * Due on: Sunday August 7 * Author: <NAME>, <NAME> * Student ID: 40113513, 40200924 */ #include <iostream> #include "Vertex.h" #include "Edge.h" using namespace std; Edge::Edge() { weight = 0; start = Vertex(); end = Vertex(); } Edge::Edge(int w, Vertex& s, Vertex& e) { weight ...
TOOL
0.972055
5.287323
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-07-20T15:40:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3a14247be4...
c9ca42a1-a60b-4db4-8b2e-d4c95d650105
EshwarReddy13/CSCE-121
CSCE-121/[LW] 6/cstring.cpp
#include <iostream> #include "cstring.h" unsigned int length(char str[]) { // returns the length of the string including zero (0) char a; int i=0; while(a != '\0'){ a = str[i]; i++; } i--; return i; } unsigned int find(char str[], char character) { // returns // - the index of the firsdddd...
ALGO
0.99197
3.96856
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-04-03T22:33:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "977c51b5949...
76ca6613-dbcf-4dd8-93a8-57dd30393fef
vremyavnikuda/codewars
c++/3semestr/kur_1/AdList.cpp
#include "AdList.h" #include <cstring> #include <iostream> #include <fstream> #include <stdexcept> #include <chrono> // Конструктор AdList::AdList() : head(nullptr), tail(nullptr), count(0) { } // Деструктор AdList::~AdList() { if (head == nullptr) { return; } AdStruct *current = head; do { ...
TOOL
0.95151
5.34418
{ "github_metadata": { "branch": "codewars_main", "commit_count": 345, "repo_created_at": "2022-11-18T23:04:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f...
429c06de-a779-4ff1-a577-eb845e8a6da0
NVIDIA/cutlass
include/cutlass/gemm/kernel/gemm_sparse_universal_with_absmax.h
/*************************************************************************************************** * Copyright (c) 2024 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
TOOL
0.968163
6.283051
{ "github_metadata": { "branch": "main", "commit_count": 667, "repo_created_at": "2017-11-30T00:11:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8078, "forks": 1336, "issues": 322, "pull_requests": 54 }, "file_meta": { "content_id": "c3...
880e683f-dba0-41c9-a760-fedb920c9e88
SharvariMore/DSA
Sorting/BubbleSort.cpp
#include<bits/stdc++.h> using namespace std; void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } void bubbleSort(int arr[], int n) { int i, j; for ( i = 0; i < n-1; i++) //check until last element of array for (j = 0; j < n-i-1; j++) // Last i elements are ...
ALGO
0.999565
5.068452
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2021-10-06T18:21:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65cff48b23e...
bf481908-672a-4be2-9b64-00f73bbba9ae
Shahbaz898414/GFG-Leetcode
test2.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; const int MOD = 1e9 + 7; signed main(void) { ll t; cin >> t; while (t--) { ll n, m; // for (ll i = 0; i < n; i++) // { // cin >> hbg[i]; // if (!hbg[i]) // { // eve++; // } // arr.push_back...
ALGO
0.999906
3.30458
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2023-03-10T13:27:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e6b9cd216d...
7d1b7ffd-ae72-4dae-9ffb-328dac3254e5
petergottschling/discovering_modern_cpp
c++03/cursor_example.cpp
#include <iostream> #include <cassert> #include <vector> #include <algorithm> template <typename Value> class coo_matrix { typedef Value value_type; // better in trait public: coo_matrix(int nr, int nc) : nr(nr), nc(nc) {} void insert(int r, int c, Value v) { assert(r < nr && c < nc); row_index.p...
ALGO
0.986387
4.294613
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-11-16T17:33:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 207, "forks": 85, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "29647f0...
abbd0f33-5f38-4b42-8b86-7a47bb4e94b0
2997ms/Competitive-programming-problems
Codeforces/372_Div2/C.cpp
#include <fstream> #include <iostream> #include <functional> #include <algorithm> #include <cstring> #include <vector> #include <string> #include <cstdio> #include <cmath> #include <queue> #include <stack> #include <deque> #include <ctime> #include <list> #include <set> #include <map> using namespace std; typedef long...
ALGO
0.999775
3.34284
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2016-05-05T02:53:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26143aab...
b4ba9655-e025-45c8-a565-4d083e9c5b23
ishandutta2007/codeforces-y
yzc2005/normal/1097/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define mem(a, x) memset(a, x, sizeof a) #define fu(i, a, b) for(int i = a, I = (b) + 1; i < I; ++i) #define fd(i, a, b) for(int i = a, I = (b) - 1; i > I; --i) const int K = 10005, N = 55, mod = 1e9 + 7; int k, dp[K][N], inv[N], ans = 1; ll n; inli...
ALGO
0.999926
4.587669
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d108fc99e7c6...
dbec395f-36aa-4fd4-95b3-ddf6af95465b
kaffelars/megagruve
src/utils/randfunc.cpp
#include "consts.h" #include "randfunc.h" // //functions from https://github.com/SRombauts/SimplexNoise/blob/master/src/SimplexNoise.cpp //Copyright (c) 2014-2018 <NAME> (<EMAIL>) //Distributed under the MIT License (MIT) http://opensource.org/licenses/MIT // namespace randfunc { namespace { int seedn...
ALGO
0.99863
5.497763
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2021-08-09T20:22:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6d336316d9...
8f0d45c2-c61a-4ca6-97ff-9731ab8434a3
vivek-ydv/DSA-CPP
DSA Programs/Arrays/18_FindingPairsinArray.cpp
#include <iostream> using namespace std; // Find all the pairs have sum equal to the k or 10 void Pairs1(int arr[], int length, int k) // Time Complexity = O(n^2) { int count = 1; for (int i = 0; i < length - 1; i++) { for (int j = i + 1; j < length; j++) { if (arr[i] + arr[j] =...
ALGO
0.990489
4.831507
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-02-22T06:14:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "339f5363c034...
d45818bb-31ef-4120-b5d6-50fff497aabd
tanishq1306/DSA-Solved-Questions
String/15_find_next_greater/find_next_greater.cpp
/** * author: tanishq * created: 16.10.2020 **/ #include <bits/stdc++.h> using namespace std; void next_permutation (vector<int> &nums) { int n = nums.size(), indx1 = -1, indx2 = -1; for (int i = n - 2; i >= 0; i--) { if(nums[i] < nums[i + 1]) { indx1 = i; break; } } if (indx1 == -1) { r...
ALGO
0.999976
5.310826
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2020-10-17T09:30:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7afa7dbef6...
7581bdda-6186-4e38-9c85-86497313dd59
jdoerfert/PACT-22-Artifact---Breaking-the-Vendor-Lock---Performance-Portable-Programming-Through-OpenMP
benchmarks/HeCBench/bsw-sycl/driver.cpp
#include "utils.hpp" #include "common.h" #include "kernel.cpp" void kernel_driver_aa(std::string filename, std::vector<std::string> &reads, std::vector<std::string> &contigs, short h_scoring_matrix[], short openGap, shor...
ALGO
0.989888
4.068727
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-09-15T21:14:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "851c0433b4eb...
e396e911-fa4a-46a5-a5cb-2c56967b9f43
hieule22/contests
codeforces/misc/a.cpp
#include <string> #include <iostream> using namespace std; inline bool isSeparator(char c) { return c == ',' || c == ';'; } inline bool isNumeric(char c) { return c >= '0' && c <= '9'; } inline bool isInteger(string word) { if (word.size() == 0) return false; for (int i = 0; i < word.size(); i++) if (!isNumer...
TOOL
0.998654
3.447518
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2016-03-21T03:00:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b650c9b9...
03efc3a0-469a-4dce-92c0-f7fd8d7eb200
b4435242/apriori
apriori.cpp
#include <iostream> #include <vector> #include <set> #include <string> #include <tuple> #include <fstream> #include <cmath> #include <iomanip> #include <algorithm> #include <chrono> #include "common/input_reader.h" #include "common/output_printer.h" using namespace std; long double round(long double value, int pos...
DATA
0.986156
5.005573
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-11-19T07:22:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f3ebb0027...
d6d540a6-eb68-49a1-80e1-d36e6725db4c
libspatialindex/libspatialindex
src/tools/rand48.cc
/* * Copyright (c) 1993 <NAME> * All rights reserved. * * You may redistribute unmodified or modified versions of this source * code provided that the above copyright notice and this and the * following conditions are retained. * * This software is provided ``as is'', and comes with no warranties * of any kind. I shall...
ALGO
0.99585
4.90483
{ "github_metadata": { "branch": "main", "commit_count": 639, "repo_created_at": "2011-06-19T14:06:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 753, "forks": 203, "issues": 19, "pull_requests": 0 }, "file_meta": { "content_id": "d83ea3...
9a3210ac-cd22-4817-a74f-2923e337aa35
jecrs687/olympics-questions
beecrowd/2243.cpp
//https://xtecna.gitbook.io/solucoes-da-beecrowd/paradigmas/2243-isosceles #include <iostream> // #include <bits/stdc++.h> #include <vector> #include <iomanip> #include <cstring> #include <map> #include <string> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include ...
ALGO
0.999969
4.901
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-06-12T10:05:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f38da4d6670...
255aa5e7-010f-4b41-a0ba-01e38c358589
piotrcurious/Grothendieck_legacy_junkbox
svm_fit/3/7.ino
#include <Arduino.h> #include <vector> #include <cmath> #include <algorithm> #include <numeric> #include <functional> // Constants and Configuration const int MAX_POLYNOMIAL_DEGREE = 5; const size_t MAX_DATA_POINTS = 100; // Type Definitions using Timestamp = unsigned long; using Value = double; struct DataPoint { ...
ALGO
0.978319
5.963462
{ "github_metadata": { "branch": "main", "commit_count": 396, "repo_created_at": "2024-07-23T22:27:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57773c2dae...
0cd65f54-e31a-44b9-ad15-874a44f840aa
lzl124631x/LeetCode
leetcode/1411/s3.cpp
// OJ: https://leetcode.com/problems/number-of-ways-to-paint-n-3-grid/ // Author: github.com/lzl124631x // Time: O(logN) // Space: O(1) // Ref: https://leetcode.com/problems/number-of-ways-to-paint-n-3-grid/discuss/575485/C%2B%2BPython-O(logN)-Time class Solution { typedef long long LL; int mod = 1e9+7; vec...
ALGO
0.999981
5.498629
{ "github_metadata": { "branch": "master", "commit_count": 5060, "repo_created_at": "2015-05-16T12:48:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1471, "forks": 377, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "6...