##
Print a pattern without using any loop
September 22, 2015

Given a number n, print following pattern without using any loop. Input: n = 16 Output: 16, 11, 6, 1, -4, 1, 6, 11, 16

September 22, 2015

Given a number n, print following pattern without using any loop. Input: n = 16 Output: 16, 11, 6, 1, -4, 1, 6, 11, 16

September 14, 2015

Let us first put ‘priority inversion’ in the context of the Big Picture i.e. where does this come from.

August 26, 2015

Find the n’th term in Look-and-say (Or Count and Say) Sequence. The look-and-say sequence is the sequence of below integers: 1, 11, 21, 1211, 111221, 312211, 13112221, 1113213211, …

July 6, 2015

Given a number line from -infinity to +infinity. You start at 0 and can go either to the left or to the right. The condition is that in i’th move, you take i steps.

March 10, 2015

Given two dates, find total number of days between them. The count of days must be calculated in O(1) time and O(1) auxiliary space.

November 17, 2013

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 bikes?

June 25, 2013

We have covered basic information about shared libraries in the previous post. In the current article we will learn how to create shared libraries on Linux.

June 14, 2013

This article is not for those algo geeks. If you are interested in systems related stuff, just read on…

April 2, 2013

When a C program is compiled, the compiler generates object code. After generating the object code, the compiler also invokes linker. One of the main tasks for linker is to make code of library functions (eg printf(), scanf(), sqrt(), ..etc) available to your program.

March 27, 2013

Given n sets of integers of different sizes. Each set may contain duplicates also. How to find the intersection of all the sets. If an element is present multiple times in all the sets, it should be added that many times in the result.

November 21, 2011

Question 1 Predict the output of the following program. What does the following fun() do in general?