Re: [algogeeks] Sub-array problem

2011-11-29 Thread Nitin Garg
this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks

[algogeeks] Interview question

2011-11-29 Thread Nitin Garg
*What are the different ways to say, the value of x can be either a 0 or a 1.* -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] Re: Google Question--Suggest Algo

2011-11-28 Thread Nitin Garg
, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them

Re: [algogeeks] Suggest Algo: OffCampus Apple Interview Question

2011-11-28 Thread Nitin Garg
. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email

Re: [algogeeks] Re: Linear time Binary tree re-construction

2011-11-28 Thread Nitin Garg
. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email

Re: [algogeeks] Re: Linear time Binary tree re-construction

2011-11-28 Thread Nitin Garg
A[1,n,1,n] will give us the solution. On Mon, Nov 28, 2011 at 7:47 PM, Nitin Garg nitin.garg.i...@gmail.comwrote: Lets say the in-order traversal is O = O1,O2,...On Pre-order is P = P1,P2,...Pn Lets assume that the in-order traversal gives sorted sequence of numbers. (if not, we can

[algogeeks] facebook interview question

2011-11-28 Thread Nitin Garg
Find the min and max in an array. Now do it in less than 2n comparisons. (they were looking for the solution that finds both max and min in about 3/2 n comparisons). -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you

[algogeeks] Google interview question

2011-11-26 Thread Nitin Garg
Hi Guys I saw this question http://stackoverflow.com/questions/8189334/google-combinatorial-optimization-interview-problm But couldn't get the solution which has been accepted, nor could work out one on my own. Please help! -- Nitin Garg Personality can open doors, but only Character can keep

Re: [algogeeks] Re: Find the Minimum length Unsorted Subarray, sorting which makes the complete array sorted

2011-11-24 Thread Nitin Garg
. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only

Re: [algogeeks] Does Y lies between x and z

2011-11-24 Thread Nitin Garg
://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com

Re: [algogeeks] Re: An Array Problem

2011-11-24 Thread Nitin Garg
+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group

Re: [algogeeks] Re: array searching

2011-11-24 Thread Nitin Garg
://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com

Re: [algogeeks] Amazon Question

2011-11-14 Thread Nitin Garg
...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Amazon Question

2011-11-12 Thread Nitin Garg
If yes, how do you prove it? On Sat, Nov 12, 2011 at 8:18 PM, Nitin Garg nitin.garg.i...@gmail.comwrote: I can prove that the size of resulting string will be 1 or 2. @surender - what do you mean by no of distinct characters? they are 3 in this case - a,b and c. Do you mean to say

Re: [algogeeks] Re: Searching In a large file

2011-10-29 Thread Nitin Garg
://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com

Re: [algogeeks] What Data Structure to use ?

2011-10-29 Thread Nitin Garg
://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com

Re: [algogeeks] Re: Intersection of arrays

2011-10-28 Thread Nitin Garg
from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you

Re: [algogeeks] Re: Find all possible combination of integers for a given sum

2011-10-27 Thread Nitin Garg
to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep

Re: [algogeeks] Amazon Onsite

2011-10-24 Thread Nitin Garg
...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Amazon - array problem

2011-09-30 Thread Nitin Garg
to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] Amazon - array problem

2011-09-30 Thread Nitin Garg
On Fri, Sep 30, 2011 at 1:24 PM, Nitin Garg nitin.garg.i...@gmail.comwrote: Can we assume the output array is a new array and we can distort the originial array??? On Fri, Sep 30, 2011 at 9:14 AM, praveen raj praveen0...@gmail.comwrote: Take two array... one will take care of left products

Re: [algogeeks] Re: MS Question - Median of a BST without using extra space and in O(n)

2011-09-27 Thread Nitin Garg
://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com

Re: [algogeeks] Amazon Interview Question

2011-09-24 Thread Nitin Garg
@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message

Re: [algogeeks] Re: MICROSOFT IDC

2011-09-23 Thread Nitin Garg
://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors, but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-21 Thread Nitin Garg
Ohh i totally missed that line. Thanx a lot :) On Wed, Sep 21, 2011 at 10:46 AM, pankaj agarwal agarwal.pankaj.1...@gmail.com wrote: @Nitin Garg Question 6 - i agree that greater the sum is and greater the probability to getting it. but in given question if sum100 then rolling is stopped

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread Nitin Garg
bhanuchowd...@gmail.comwrote: @Nitin: Answer to question 3 is 50. On Mon, Sep 19, 2011 at 11:44 AM, praveen raj praveen0...@gmail.comwrote: @nitin Plz explain how u have reached answer of question no. 4 and 6 On 19-Sep-2011 12:26 AM, Nitin Garg nitin.garg.i...@gmail.com wrote: Answer 3

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread Nitin Garg
:04 PM, Nitin Garg nitin.garg.i...@gmail.comwrote: Question 3 - To eliminate one player, you need to host atleast 2 matches and make him loose in both 2. These 2 matches can not contribute to elimination of any other player. So, min 2 matches for every player who is to be eliminated, hence 100

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread Nitin Garg
, - 0,1,2,3,4 5 4 - 0,1,2,3,4,5,6,7 8 . . . 1,2,3,5,8,11,17,25,38,57,86,129,194 I kept counting, got 194. Don't know of any shortcut. On Mon, Sep 19, 2011 at 1:35 PM, Nitin Garg nitin.garg.i...@gmail.comwrote: Question 6 - Intuitively you can see that the greater the sum

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-19 Thread Nitin Garg
Can someone tell answers to question 2 and 5 with explanation?? On Mon, Sep 19, 2011 at 1:40 PM, Nitin Garg nitin.garg.i...@gmail.comwrote: In Question 4 i just kept counting new processes that are being added in every iteration. No. of new processes being created is equal to the already

Re: [algogeeks] Re: Directi Questions - needed answers

2011-09-18 Thread Nitin Garg
@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors... but only Character can keep them open -- You received

Re: [algogeeks] Re: Stack problem

2011-09-04 Thread Nitin Garg
. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors... but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send

Re: [algogeeks] Algorithms for Interviews

2011-09-03 Thread Nitin Garg
Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality

Re: [algogeeks] Algorithms for Interviews

2011-09-03 Thread Nitin Garg
This link worked for me http://www.mediafire.com/?a2ia1j1i0q0pet1 On Sat, Sep 3, 2011 at 9:22 PM, Nitin Garg nitin.garg.i...@gmail.comwrote: Even i need the book. Please reshare a working link. I am studying computer science at IIT Delhi. On Sat, Sep 3, 2011 at 9:08 PM, vivek goel

Re: [algogeeks] Re: memory allocation question

2011-09-03 Thread Nitin Garg
this group at http://groups.google.com/group/algogeeks?hl=en. -- Nitin Garg Personality can open doors... but only Character can keep them open -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks