• RSS
  • Facebook
  • Twitter

Knowledge is Power.

  • Who you are ?

    Working on machines without understanding them ? Then you should be here..

  • Where you are ?

    Geographical location should not become a barrier to Share our knowledge.

  • What do you do ?

    Puzzles and Interview question are intended to be discussed here.

    Monday, July 29, 2013

    Hello Guys, As a newbie on online Coding contests, I was initially fed-up with 1000000007.I hardly understood the logic behind it. Some guys give an hint that "its the first 10 digit prime..", so what ? There were 2 questions in my mind. 1) Why only a prime. 2) Why not 2nd or 3rd prime Instantly I got an partial answer from myself for the first question, A prime because we need (ans % Prime) as the actual answer, so the o/p should...

    Sunday, July 28, 2013

    Problem Statement A company organizes two foreign trips for its employees yearly. Aim of the trip is to increase interaction among the employees of the company and hence company wants each of his employee to see new people on the trip and not even a single person with whom he has worked in past. Therefore it is a rule in company that in any of the trips, all the employees should be new to each other and no two of them should have worked together...

    Monday, July 15, 2013

    Problem Statement In a family party, people are playing the musical pillow game in which people sit in a circle. Starting from the first person, they transfer the pillow to the person to their left. For simplicity, we’ll assume that people are assigned an integer tag from 1 to n(which is the total number of people) in the clockwise manner, so that during the game pillow is passed in the increasing sequence of. When game starts, a song...

    Monday, July 8, 2013

    Problem Statement You are given a set of positive integers. your task is to solve partition problem. Lets define the partition problem. Partition problem is the task of deciding whether a given multiset of positive integers can be partitioned into two subsets S1 and S2 such that the sum of the elements in S1 equals the sum of the elements in S2. Example 1: array[] = {1, 5, 11, 5} Output: Yes This array can be divided into to subsets...
    Problem Statement Rahul is playing a very interesting game. He has N disks ( each of equal radius).  Every disk has a distinct number out of 1 to N associated with it. Disks are placed one over other in a single pile. Rahul wants to sort this pile of disk in increasing order from top to bottom. But he has a very very special method of doing this. In a single step he can only choose one disk...
    Problem Statement You are given an array A[] containing n positive integers. Lets define Bitonic subsequence. A subsequence of array A[] is called Bitonic if it is first strictly increasing and then strictly decreasing. Your task is to find the length of largest bitonic subsequence given an array. Note- A sequence sorted in increasing order is considered as Bitonic with decreasing part as empty. Similarly, A sequence sorted...