# ALGORITHMS

#### Hash Map (Part 1) Hash map (Hash table) is a data structure that maps keys to values with constant time. It is a very useful and commonly used data structure by programmers either for development or competitive programming. C++ programmer often use STL map container class as a hash map and Java programmers use Has...

#### Segment Tree (Part 1)

Given a list of elements Segment Tree can find out any information of a segment/part of the list. As an example, given an array `[8, 7, 3, 9, 5, 1, 10]` you are asked to find sum of elements between between 2nd and 5th element (index starts from 0, including boundary). Answer is `18`.

...

#### Bitwise Operations (Part-2)

##### Bitwise GCD:

Bitwise GCD is applicable only for unsigned int. It's 60% faster than normal numeric gcd algorithm. The quick short implementation of bitwise GCD is:

``````public int gcd(int a, int b) {
while(b) b ^= a ^= b ^= a % b;
return a;
}``````

Ref: https://en.wikipedia.org/wiki/Binary_GCD_a...

#### Solving Graph Problems (Part 1) - Basic Solving graph problems for newbies was never been easy. In this series of blog, I am going to delineate solutions of graph problems precisely taken from several online judges which will help newbies to solve graph problem from easy to hard categories. Although It's good to have a theoritical backgro...