## Fibonacci Numbers in O(logn) [Matrix Exponentiation]

Matrix multiplication can be performed in O(logn) by using matrix exponentiation. It is one of the most used techniques

## Minimum number of moves to equal array elements – LeetCode Solution [Medium]

Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal. In one move, you can increment n – 1 elements of the array by 1.

## Number of ways to climb a stair having n steps – LeetCode Solution [Easy]

You are climbing a staircase. It has n steps upto the top. Each time you can either climb 1 step or 2 steps. You’ve to find the number of ways to climb the stair.

## Implementing basic Mathematical operations (Euclidean algorithm for GCD)

Given two non-negative integers a and b, you’ve to find the Greatest Common Divisor (GCD) or Highest Common Factor (HCF) of the two numbers. In other words, find the largest number that divides them both. The Euclidean algorithm is one of the oldest numerical algorithms to compute the greatest common divisor (gcd) of two positive integers.

## Implementing basic Mathematical operations (Exponential)

Drawback of this method is that it will cause int overflow. This is because pow( ) method will calculate the exponential before taking the modulo.

## Find all the occurrences of a substring in a given string in C++

Given a string s1, find the occurrences of string s2 in s1.
Input: s1 = “onlycode”; s2 = “code”

## Tower of Babylon Solution – SPOJ.com

Given n different types of blocks. Each one of them may be duplicated as many times as you like. Each type has a height y, a width x and a depth z.

## Stock Span Problem – LeetCode Solution [Medium]

The stock span problem is a financial problem defined as the maximum number of consecutive days (starting from today and going backward)

## Competitive Programming (Draughts) | CodeChef

This problem was asked in February challenge 2014. Around 900 people were able to solve this problem.
It’s not very intuitive for beginners. And also not very straightforward for someone not doing competitive programming.

## Sieve of Eratosthenes | HackerRank Solution

The sieve of Eratosthenes is an ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking numbers in the range as composite by marking the multiples of each prime as non-prime.