# Category Archives: Algorithms

Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as a pivot and partitions the given array around the picked… Read More
Similar to the Merge Sort algorithm, the Quick Sort algorithm is a Divide and Conquer algorithm. It initially selects an element as a pivot element… Read More
Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot.… Read More
Just unlikely merge Sort, QuickSort is a divide and conquer algorithm. It picks an element as a pivot and partitions the given array around the… Read More
The problem is to count all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each… Read More
Given an integer array and a positive integer k, count all distinct pairs with differences equal to k.  Examples:  Input: arr[] = {1, 5, 3,… Read More
The problem is to print all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each… Read More
Given a positive integer n, generate all possible unique ways to represent n as sum of positive integers.  Examples:  Input: n = 2 Output: 2… Read More
Given two integers, write a function to multiply them without using multiplication operator.There are many other ways to multiply two numbers (For example, see this).… Read More
Online Test on InterviewStreet: 18 MCQs (Normal C loop questions, networking, dbms, os, analytical) 2 Coding questions 1. Check if an undirected graph is a tree or not. 2.… Read More
We are given an array of n points in the plane, and the problem is to find out the closest pair of points in the… Read More
There are n bikes and each can cover 100 km when fully fueled. What is the maximum amount of distance you can go using n… Read More
We introduced graph coloring and applications in previous post. As discussed in the previous post, graph coloring is widely used. Unfortunately, there is no efficient… Read More
Location: Guagaon Position: Software Developer I decided to write this post because when i was preparing, I didn’t find any help on google about the… Read More
Given n line segments (p1, q1), (p2, q2), … (pn, qn), find if the given line segments intersect with each other or not. Example: Input:… Read More