Skip to content

Instantly share code, notes, and snippets.

View vinitshahdeo's full-sized avatar
🚀
Building world's first Large Pricing Model (LPM)

Vinit Shahdeo vinitshahdeo

🚀
Building world's first Large Pricing Model (LPM)
View GitHub Profile
@vinitshahdeo
vinitshahdeo / NGE.cpp
Last active September 26, 2018 23:42
GeeksForGeeks Important Questions
/*
Author - Vinit Shahdeo
*/
#include<bits/stdc++.h>
using namespace std;
void printNGE(int a[],int n)
{
stack<int> s;
map<int,int> m;
for(int i=0;i<n;i++)
@vinitshahdeo
vinitshahdeo / merge_sort.cpp
Last active September 1, 2018 13:21
Sorting Algorithms
/*
Author - Vinit Shahdeo
Check here - https://code.hackerearth.com/ad6725j
*/
#include <iostream>
using namespace std;
void printArray(int a[],int n)
{
for(int i=0;i<n;i++)
cout<<a[i]<<" ";
@vinitshahdeo
vinitshahdeo / inorder_bst.cpp
Created August 1, 2018 10:19
Inorder Successor - BST
Node * inOrderSuccessor(Node *root, Node *x)
{
if(root==NULL)
return root;
if(x->right)
{
Node* temp=x->right;
while(temp->left!=NULL)
temp=temp->left;
return temp;
@vinitshahdeo
vinitshahdeo / delete_bst.cpp
Last active August 1, 2018 09:38
Trees - Data Structures
Node* findMin(Node* root)
{
while(root->left!=NULL)
root=root->left;
return root;
}
Node * deleteNode(Node *root, int x)
{
if(root==NULL)
return root;