Category: ACM

07
Jul
2017

Counting Sort

Algo: COUNTING-SORT(A,B,k) 1. let C[0..k] be a new array 2. for i = 0 to k 3….

06
Jul
2017

Binary Search Tree: Successor in Inorder Traversal

code: /* C++ program to find Inorder successor in a BST */ #include<bits/stdc++.h> using namespace std; struct…

05
Jul
2017

Delete a node in Binary Search Tree

code: #include<bits/stdc++.h> using namespace std; struct Node{ int data; struct Node* left; struct Node* right; }; Node*…

04
Jul
2017

Traversal in Binary Search Tree

Height of a binary tree:   Level Order BFS in Binary Search Tree: #include<bits/stdc++.h> #include<queue> using namespace…

04
Jul
2017

Binary Search Tree

youtube : code: #include<iostream> using namespace std; //Definition of Node for Binary search tree struct BstNode {…

02
Jul
2017

Hackerearth: COUNT NUMBERS

code: #include<bits/stdc++.h> using namespace std; int main() { int t,n,i,a; string s; cin>>t; while(t–) { int c=0;…