Skip to content

Instantly share code, notes, and snippets.

View HarshVardhanKumar's full-sized avatar
🎯
Focusing

Harsh Kumar HarshVardhanKumar

🎯
Focusing
View GitHub Profile
#include <iostream>
#include <unordered_map>
#include <set>
using namespace std ;
unordered_map<string, set<string> > productions, first_values, follow_values;
set<string> non_terminals, terminals;
string start_symbol ;
string getBody(string produc) {
//
// Created by Harsh Vardhan Kumar on 10-09-2018.
//
#include <iostream>
#include <unordered_map>
#include <string>
using namespace std ;
unordered_map <string, int> keywords ;
@HarshVardhanKumar
HarshVardhanKumar / LIS.cpp
Created February 28, 2018 15:54
Fastest Implementation of Longest Increasing Subsequence problem
//
// Created by Harsh Vardhan Kumar on 28-02-2018.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <fstream>
@HarshVardhanKumar
HarshVardhanKumar / Dijkshtra.cpp
Last active February 4, 2018 17:56
C++ implementation of Dijkshtra's Algorithm
//
// Created by Harsh Vardhan Kumar on 29-01-2018.
//
#include <iostream>
#include <set>
#include <vector>
using namespace std ;
const int inf = 1000000 ;
@HarshVardhanKumar
HarshVardhanKumar / PrimsAlgo.cpp
Created January 29, 2018 15:17
Implementation of Prim's Algorithm using STL set in c++
//
// Created by Harsh Vardhan Kumar on 29-01-2018.
//
#include <iostream>
#include <set>
#include <vector>
#define inf 1000000 ;
#define nil -1000000
@HarshVardhanKumar
HarshVardhanKumar / UnionFindDisjointSets.h
Created January 6, 2018 11:49
Union Find Disjoint Sets implementation in c++
//
// Created by Harsh Vardhan Kumar on 01-01-2018.
//
#ifndef UNTITLED_UFDS_H
#define UNTITLED_UFDS_H
#include <vector>
#include <iostream>
#include <unordered_map>