Re: [algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread varun pahwa
will this work. n size of array. cal (a[i] - min(arr) + 1). now cal sum of a[i], cal square sum of array as (a[i] * a[i]) , cal cube sum of array as (a[i] * a[i] * a[i]). now if array elements are consecutive then sum must be n * (n + 1) / 2. square sum must be (n * (n + 1) * (2n + 1) )/ 6 and cube

[algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread Adarsh
I think I got an work around for this if number of elements are not odd why not make them odd :) I variation to my prev algo int n = A.size(); for (int i=0; ihttp://groups.google.com/group/algogeeks?hl=en.

[algogeeks] Re: spoj shlights

2011-06-24 Thread anonymous procrastination
Hello, Were you able to figure out the solution? On Jun 23, 3:33 pm, Jitendra singh wrote: > @ kartik sachan > Problem with this code is this- > All GB pairs should be process in one time period > > On 6/23/11, kartik sachan wrote: > > > > > QUESTION LINK IShttp://www.spoj.pl/problems/SHLIGHTS/

Re: [algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread sunny agrawal
@adarsh no it will Fails for both even and odd no of elemets a[] = {2,2,2,4,6,6,6} seems like we need to check for the presence of each no between min to max using a good hashing approach. On Sat, Jun 25, 2011 at 11:20 AM, Adarsh wrote: > Missed that... also, my method seems to work only if num

[algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread Adarsh
Missed that... also, my method seems to work only if number of elements are odd. -- 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 to a

Re: [algogeeks] Google Interview

2011-06-24 Thread Anantha Krishnan
Idea is like this since both the arrays may not be of same length lets divide (k-1) smallest elements proportionally in both the arrays: let i point the array A by i=m/(m+n) * (k-1) [since we have to divide k-1 elements among two] j=(k-1) - i then try to insert A[i] between B[j-1] and B[j] if thr

Re: [algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread sunny agrawal
@Adarsh fails on this a[] = {2,2,2,6,6,6} On Sat, Jun 25, 2011 at 10:54 AM, Adarsh wrote: > int n = A.size(); > for (int i=0; itotal += A[i]; > findMinMax(A[1...n]); > > int mean = (max+min)/2; > if ((total - n*mean) == 0) >printf("consecutive\n"); > else >printf("not consecutive\n")

[algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread Adarsh
int n = A.size(); for (int i=0; ihttp://groups.google.com/group/algogeeks?hl=en.

Re: [algogeeks] Re: Google Question

2011-06-24 Thread ankit sambyal
@Anand : Plz explain ur algo ??? On Fri, Jun 24, 2011 at 10:55 AM, Anand wrote: > http://anandtechblog.blogspot.com/2011/06/bitonic-merge.html > > On Fri, Jun 24, 2011 at 2:17 AM, sankalp srivastava > wrote: >> >> 1,2,43,41,5 , 6 >> Start at a[3] and a[5] Swap them up . >> Reversing it , we g

Re: [algogeeks] Re: O(n) Time is the problem. ..

2011-06-24 Thread sunny agrawal
@Dave it is given in Question that elements of array are integer On Sat, Jun 25, 2011 at 7:17 AM, Dave wrote: > @Sunny: What makes you think that the integers are 32 bits in length. > Remember that O(.) notation applies as n --> infinity. Thus, O(n log > n) is correct for a naive algorithm. But

Re: [algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread oppilas .
Gene is correct :) Counter example {1, 2, 2, 5, 5} See method 3 here http://geeksforgeeks.org/?p=11516 On 6/25/11, Gene wrote: > Nice idea, but unfortunately doesn't work. The XOR only contains > parity information. So just pick two values in the range and a low > order bit where they're differe

[algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread Gene
Nice idea, but unfortunately doesn't work. The XOR only contains parity information. So just pick two values in the range and a low order bit where they're different. Then swap the bits. 2 xor 3 xor 4 xor 5 = 0 Pick 3 and 4 and swap the lsb, which gives 2 and 5. So we have 2 xor 2 xor 5 xor 5

[algogeeks] Re: O(n) Time is the problem. ..

2011-06-24 Thread Dave
@Sunny: What makes you think that the integers are 32 bits in length. Remember that O(.) notation applies as n --> infinity. Thus, O(n log n) is correct for a naive algorithm. But a little thought can give a divide-and-conquer algorithm which is O(n). Dave On Jun 24, 8:44 am, sunny agrawal wrote

Re: [algogeeks] Google Interview

2011-06-24 Thread Anand
Two arrays are arr[] and sec[] To find kth smallest element of the two sorted array. i = 1 1. Find Index = k/(2 ^ i) 2. if arr[Index] < sec[Index] && arr[index] < sec[index -1] then increment index of the first array and decrement the index of second array. i++ 3. if arr[index] > se

Re: [algogeeks] O(n) Time is the problem. ..

2011-06-24 Thread aditya kumar
soln 1 : we can take one more array B[ ] of size n. start inserting the number from the array A[ ] into the index of array B[ ] ie number 39 from array A[ ] will go in 39th place . finally the missing element can be found by tracing array B[ ] . soln 2 :Find sum of n numbers and Sum of all the n

[algogeeks] Hot Hot Hot Requirement || QA Tester With Microstrategy

2011-06-24 Thread Steven Smith
Blank Hi Business Partner, Hope you are doing well today, This is Steven Smith from Panzer Solutions looking for QA Tester With Microstrategy for* 2+Month contract*. Please let me know if you have any one available for below position. Position : QA Tester With Microstrategy Located : Res

[algogeeks] QA Tester With Microstrategy || Very Very Very Hot Requirement of the day------

2011-06-24 Thread Steven Smith
Blank Hi Business Partner, Hope you are doing well today, This is Steven Smith from Panzer Solutions looking for QA Tester With Microstrategy for* 2+Month contract*. Please let me know if you have any one available for below position. Position : QA Tester With Microstrategy Located : Res

Re: [algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread Piyush Sinha
I have a solution that will do the job in O(n) time but will require three variablesbut this solution won't work if the array contains -ve numbers. * int findrepeat(int a[],int n) { int i,xor = 0; int min = findmin(a,n); int max = findmax(a,n); if((max-min+1)!=n) re

Re: [algogeeks] Google Interview

2011-06-24 Thread ankit sambyal
start thinking as we do in a binary search. if we want to find the kth smallest no., then compare the k/2 elements of both the arrays. And depending upon the answer, go for further iterations Try it out..Plz ask if u don't understand. I hv just droped a small hint Ankit Sambyal BITS P

[algogeeks] Re: Sort - Consecutive Array in O(n)

2011-06-24 Thread ross
One solution would be to : check if max-min = N and that all elements are unique in the array. However, this may require space complexity.. Looking for a better solution. On Jun 25, 12:44 am, ross wrote: > Given an array, A, find if all elements in the sorted version of A are > consecutive in les

[algogeeks] Sort - Consecutive Array in O(n)

2011-06-24 Thread ross
Given an array, A, find if all elements in the sorted version of A are consecutive in less than O(nlogn). eg: A: 5 4 1 2 3 on sorting 1 2 3 4 5 all elements are consecutive -- true A: 1 9 2 22 on sorting 1 2 9 22 all elements are NOT consecutive - false -- You received this message because you ar

[algogeeks] نجدية تتناك على الارض وهى لابسة نظارة شمس

2011-06-24 Thread asxsa asxsa
[image: http://i20.servimg.com/u/f20/09/00/39/91/010.png] [image: http://i20.servimg.com/u/f20/09/00/39/91/010.gif] [image: http://i20.servimg.com/u/f20/09/00/39/91/0010.png] * Name

Re: [algogeeks] NEED ALGO IN TIME 0.00

2011-06-24 Thread prathimzn
sorry my time is 0.2 and i use simple int array and sort function of ... *- - - - - WITH REGARDS, * * PRAMENDRA RATHI * ** *B.TECH 2ND YEAR* *COMPUTER SCIENCE AND ENGINEERING* *NIT ALLAHABAD* On Sat, Jun 25, 2011 at 12:04 AM, sunny agrawal wrote: > i am not sure about this > but when i solved

Re: [algogeeks] NEED ALGO IN TIME 0.00

2011-06-24 Thread sunny agrawal
i am not sure about this but when i solved this problem using simple scanf, printf and sort function of algorithm library, my time was 0.08 so might be reading the values in character buffer and then parsing then in ints may help how did you implemented ? did you implemented your own sort funtion

Re: [algogeeks] Writing good code in interviews

2011-06-24 Thread Anand
I think documenting the code is more important. On Fri, Jun 24, 2011 at 10:24 AM, pacific :-) wrote: > Hey all, > > I want to know a quick list of things (positive and negative) looked in > the code written during interviews. > > I think these are a couple of things to take care. > > 1. Writi

Re: [algogeeks] Writing good code in interviews

2011-06-24 Thread rajeev bharshetty
1 : The Code should be properly indented and readable . 2 : The Code should not exceed the provided by barriers and limits. 3 : It should use better and efficient language constructs. On Fri, Jun 24, 2011 at 10:54 PM, pacific :-) wrote: > Hey all, > > I want to know a quick list of things (posi

[algogeeks] Re: Sum to K problem

2011-06-24 Thread ross
This is the subset sum problem which is NP,. The DP is as follows, M[i,j] = 1 , if a subset of first i elements has a sum = j. else 0, The recurrence is, M[i,j] = max(M[i-1,j] , M[i-1,j-Ai]) where Ai is the ith element. You can maintain back pointers to keep track of previous elements so that th

Re: [algogeeks] Re: Algorithmic Pioneers

2011-06-24 Thread rajeev bharshetty
Thanks Dave for the suggestions I have Updated it. On Fri, Jun 24, 2011 at 10:13 PM, Dave wrote: > Add John von Neumann, for Gaussian Elimination. > Cooley and Tukey for the Fast Fourier Transform. > Jim Wilkinson, for error analysis in floating point arithmetic. > > Dave > > On Jun 24, 12:44 am

Re: [algogeeks] Re: Google Question

2011-06-24 Thread Anand
http://anandtechblog.blogspot.com/2011/06/bitonic-merge.html On Fri, Jun 24, 2011 at 2:17 AM, sankalp srivastava < richi.sankalp1...@gmail.com> wrote: > 1,2,43,41,5 , 6 > Start at a[3] and a[5] Swap them up . > Reversing it , we get > 1,2,43,5,6,41 > This does not work > . > On Jun 23, 9:05 pm,

[algogeeks] NEED ALGO IN TIME 0.00

2011-06-24 Thread prathimzn
http://www.spoj.pl/problems/FASHION/ i summit this question and my time is 0.02 as i used sorting and then multiply corresponding index value and sum them to get ans. but best time is 0.00 and 1.6M in C. can anyone tell me what is the best algo to solve this problem in 0.00 i.e. best algo * - -

Re: [algogeeks] Google Interview

2011-06-24 Thread Akshata Sharma
@Anantha can you explain the logic please? On Fri, Jun 24, 2011 at 10:21 PM, Anantha Krishnan < ananthakrishnan@gmail.com> wrote: > Check this http://ideone.com/C8fQC > > Thanks & Regards, > Anantha Krishnan > > > On Fri, Jun 24, 2011 at 10:18 PM, Decipher wrote: > >>

[algogeeks] Re: Queue to support insert , delete, find max in o(1)

2011-06-24 Thread ross
@Piyush: Dude, that method u suggested wont work ... It works for stacks because, while deletion of an element, We may verify if it is in the top of second stack and delete it.. (Since both the data structures are LIFO) Here in this case, if u delete, you cannot remove the top of stack and delete a

Re: [algogeeks] SET IN C

2011-06-24 Thread hary rathor
@ pecific : can you explain in more detail? -- 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 to algogeeks+unsubscr...@googlegroups.com

[algogeeks] Writing good code in interviews

2011-06-24 Thread pacific :-)
Hey all, I want to know a quick list of things (positive and negative) looked in the code written during interviews. I think these are a couple of things to take care. 1. Writing compilable code is definitely good. 2. Variables and methods should indicate their need. Can you guys add more lea

Re: [algogeeks] SET IN C

2011-06-24 Thread pacific :-)
Disjoint set data structure. Refer cormen. On Fri, Jun 24, 2011 at 10:36 PM, hary rathor wrote: > > Can anyone suggest me how to implement a set in c . > It means that it should take O(1) in insertion, deletion , finding > element > > > > > > -- > Harish Pranami > Master Of Computer Applicati

Re: [algogeeks] Re: c code help

2011-06-24 Thread hary rathor
[] has higher precedence then ( - ) operator thereby it take element first and make it to negative -- 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

Re: [algogeeks] Re: Sherlock puzzle 24 June

2011-06-24 Thread hary rathor
cause of smothering ... -- 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 to algogeeks+unsubscr...@googlegroups.com. For more options,

[algogeeks] SET IN C

2011-06-24 Thread hary rathor
Can anyone suggest me how to implement a set in c . It means that it should take O(1) in insertion, deletion , finding element -- Harish Pranami Master Of Computer Application , Deptt of computer Science, north campus , university of delhi, New Delhi pin no - 110007 -- You received thi

Re: [algogeeks] Re: c query

2011-06-24 Thread oppilas .
Please see this. http://ideone.com/ZM74d I tried to print by directly giving 2[*arr] still it's giving null and 0.000. Can anyone think of a possible reason? On Fri, Jun 24, 2011 at 8:27 PM, rajeev bharshetty wrote: > @ T3rminal That is because the term is resolved as 2[*

Re: [algogeeks] C Error

2011-06-24 Thread hary rathor
actually ?: operation have more precedence then = so it evaluate first ,to 10 in next pass it become 10=10 ; which is illegal cause of (=) operator required a variable left side but is present hence error cause lvalue required . -- You received this message because you are subscribed to the Goo

Re: [algogeeks] Google Interview

2011-06-24 Thread Anantha Krishnan
Check this http://ideone.com/C8fQC Thanks & Regards, Anantha Krishnan On Fri, Jun 24, 2011 at 10:18 PM, Decipher wrote: > Can anybody please explain how to solve this question with logarithmic > time complexity ? > > Write the code/algorithm to find the k-th Smallest El

[algogeeks] Google Interview

2011-06-24 Thread Decipher
Can anybody please explain how to solve this question with logarithmic time complexity ? Write the code/algorithm to find the k-th Smallest Element in the Union of Two Sorted Arrays . -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post t

[algogeeks] URGENT Requirerment for Sr. Java/ J2EE Developer in Raleigh, NC 3-6+ Months

2011-06-24 Thread Aakif - Gain America, Inc.
Hello, We have a hot opening for... Job Title: Sr. Java/ J2EE Developer Location: Raleigh, NC Duration: 3-6+ Months Job Description: Our client is looking for a Sr. Java Developer. The candidate will be completing server side development (backend development) on an upgrade t

[algogeeks] Re: Algorithmic Pioneers

2011-06-24 Thread Dave
Add John von Neumann, for Gaussian Elimination. Cooley and Tukey for the Fast Fourier Transform. Jim Wilkinson, for error analysis in floating point arithmetic. Dave On Jun 24, 12:44 am, rShetty wrote: > Collection of Algorithmic Pioneers can be Found here > > http://openprobe.blogspot.com/2011/

[algogeeks] URGENT Requirerment for Sr. OBBIE Developer in Minapolis, MN 6-12+ Months

2011-06-24 Thread Aakif - Gain America, Inc.
Hello, We have a hot opening for... Job Title: Sr. OBBIE Developer Location: Minapolis, MN Duration: 6-12+ Months Required: I need an OBIEE developer who knows the OBIEE report repository. Knowing Informatica and DAC would be bonus. Excellent Communication skills

[algogeeks] URGENT Requirerment for Jr. SAN Storage Administrator in Tallahassee, FL 9+ Months

2011-06-24 Thread Aakif - Gain America, Inc.
Hello, We have a hot opening for... Job Title: Jr. SAN Storage Administrator Location: Tallahassee, FL Duration: 9+ Months Must Need: . Dell EMC (CX series storage) administration, maintenance, upgrading, provisioning and management experience. . Administration

Re: [algogeeks] Explain this.....

2011-06-24 Thread oppilas .
Sorry. Ignore the last message of mine. It does not belong to this thread. :) On Fri, Jun 24, 2011 at 8:37 PM, oppilas . wrote: > Please see this. > http://ideone.com/ZM74d > I tried to print by directly giving 2[*arr] still > it's giving null and 0.000. > Can anyone thin

[algogeeks] Re: Sherlock puzzle 24 June

2011-06-24 Thread sarveswaran v
she might died because of heat generated inside the car -- 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 to algogeeks+unsubscr...@goog

Re: [algogeeks] Explain this.....

2011-06-24 Thread oppilas .
Please see this. http://ideone.com/ZM74d I tried to print by directly giving 2[*arr] still it's giving null and 0.000. Can anyone think of a possible reason? On Fri, Jun 24, 2011 at 12:55 AM, richa mahajan wrote: > i think it ll be compiler dependent becoz comma acts as

Re: [algogeeks] Re: c query

2011-06-24 Thread rajeev bharshetty
@ T3rminal That is because the term is resolved as 2[*arr] which is pointing to the structure variable 'c' of type 'job' So 'n' format specifiers should be used to print n values of a structure and that to in sequence of declarations in the structure . Hope this helps :) Regards Rajeev N B I

Re: [algogeeks] O(n) Time is the problem. ..

2011-06-24 Thread sunny agrawal
hmm i also doubt that but it is Strictly O(32n) not O(nlgn) where lgn <= 32 depending upon value of n On Fri, Jun 24, 2011 at 1:10 PM, rizwan hudda wrote: > @sunny: Think again, your solution will take O(n*log(n)), where log(n) is > the number of bits to represent > the number. > > > On Thu, Ju

Re: [algogeeks] Algorithmic Pioneers

2011-06-24 Thread abhijith reddy
+1 On Fri, Jun 24, 2011 at 1:06 PM, rizwan hudda wrote: > Add Donald Knuth, Rajeev Motwani, Manindra agrawal, Richard Karp, Vijay V > Vazirani to the list. > Peter is no doubt a great algorithm champion, and so is ACRush. But they > are definetely not the > pioneers of the algorithms field, you

[algogeeks] Re: can void pointer be incremented

2011-06-24 Thread rShetty
http://techbrother.blogspot.com/2007/11/incrementing-void-pointer.html Regards Rajeev N B On Jun 24, 6:29 pm, RITESH SRIVASTAV wrote: > C standard doesn't say anything about void pointer increment. > If you will do sizeof(void) ,I guess your gcc compiler will give you 1 > as output. > In C, for

[algogeeks] Re: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-06-24 Thread cooks
addToMailList("rohit.wali...@gmail.com"); :) On Jun 24, 2:08 pm, "murthy.krishn...@gmail.com" wrote: > yaa If any one has it, can you please mail it to me also > > Thanks, > > > > On Fri, Jun 24, 2011 at 2:36 PM, alok kediya wrote: > > any one downloaded or having link to download link, plz shar

[algogeeks] Re: can void pointer be incremented

2011-06-24 Thread RITESH SRIVASTAV
C standard doesn't say anything about void pointer increment. If you will do sizeof(void) ,I guess your gcc compiler will give you 1 as output. In C, for compatibility with the old implementation (where void * were used in place of char * and vice-versa) doing this will not result in error on some

[algogeeks] Re: c code help

2011-06-24 Thread sankalp srivastava
@ankit agarwal , it is giving zero because the region the pages are allocated for it in the .rodata section (With pointer to it pushed on the stack) is zeroed out .It can even give segmentation fault in many cases and the behaviour here in operating system and compiler dependent On Jun 23, 5:14 pm

[algogeeks] Re: Google Question

2011-06-24 Thread sankalp srivastava
1,2,43,41,5 , 6 Start at a[3] and a[5] Swap them up . Reversing it , we get 1,2,43,5,6,41 This does not work . On Jun 23, 9:05 pm, Swathi wrote: > We just need to find the start and end of the decreasing sequence then we > have to reverse the elements in that decreasing sequence by swapping the >

Re: [algogeeks] Re: Segmentation fault

2011-06-24 Thread rizwan hudda
Saurabh: Your Circular list approach will not run in the time constraints for this problem. Try solving it on SPOJ. On Fri, Jun 24, 2011 at 10:50 AM, saurabh singh wrote: > > @anonymous populate the array first.Use bottom up approach rather than > top down approach. > > -- > You received th

Re: [algogeeks] c doubt

2011-06-24 Thread Anika Jain
ya i got it.. thanx On Thu, Jun 23, 2011 at 6:01 PM, rajeev bharshetty wrote: > It is because of the ! operator in front of a , !a is always 0(in case a is > value other than 0) so it takes it as integer and hence the size is 4 bytes > whereas only a you will get 12 . The ! changes the data type

Re: [algogeeks] Re: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-06-24 Thread rizwan hudda
I have bought the book myself a week back. It is worth the money. A good collection different types of problems, and also it has a section for design problems for some practical applications. You can buy its paper back edition from www.pothi.com for low cost (600 bucks) On Thu, Jun 23, 2011 at 10

Re: [algogeeks] O(n) Time is the problem. ..

2011-06-24 Thread rizwan hudda
@sunny: Think again, your solution will take O(n*log(n)), where log(n) is the number of bits to represent the number. On Thu, Jun 23, 2011 at 6:51 PM, Sriganesh Krishnan <2448...@gmail.com>wrote: > can you explain mewhat the logic is...behind the xor operation?...is it > like inversion or enc

Re: [algogeeks] Algorithmic Pioneers

2011-06-24 Thread rizwan hudda
Add Donald Knuth, Rajeev Motwani, Manindra agrawal, Richard Karp, Vijay V Vazirani to the list. Peter is no doubt a great algorithm champion, and so is ACRush. But they are definetely not the pioneers of the algorithms field, you can probably remove them from list of pioneers. Thanks, Rizwan. On F

Re: [algogeeks] O(n) Time is the problem. ..

2011-06-24 Thread Liang Ge
Sure, if only one number is missing and all the other numbers are distinct. And we know those numbers are from 1 to n. First we xor all the numbers, we get xor1, then we let xor1 xor with numbers from 1 to n. Since xor means 1 xor 1=0, then all the number appear in the file will null out (those bit

[algogeeks] Re: can void pointer be incremented

2011-06-24 Thread himanshu kansal
one more...gcc allows void ptr to be assigned to and frm any type of ptr w/o any cast bt vc gvs an error and requires an explicit cast... whots d specifications abt ds as conforming to c standards.. On Fri, Jun 24, 2011 at 6:25 PM, himanshu kansal < himanshukansal...@gmail.com> wrote: > ca

[algogeeks] Re: Queue to support insert , delete, find max in o(1)

2011-06-24 Thread RITESH SRIVASTAV
You can use an auxiliary stack to store the minimum values.Lets call it minstack. Whenever you push an "Element" in the Original stack, compare it with the top of minstack. if it is lesser than top of minstack then push this one on both the stacks and if not then push the top of minstack again on i

[algogeeks] can void pointer be incremented

2011-06-24 Thread himanshu kansal
can v increment d void pointer its perfectly valid on gcc bt it gives me an error on vc so is it allowed by c standard or its an extension provided by gnu??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, s

[algogeeks] Re: Algorithmic Pioneers

2011-06-24 Thread rShetty
I Have Updated :) On Jun 24, 11:45 am, radha krishnan wrote: > Include Euler !!! > > On Fri, Jun 24, 2011 at 12:11 PM, Vishnutej Mylavarapu < > > > > > > > > mylavarapu.vishnu...@gmail.com> wrote: > > You can add AC Rush too.. > > > On Fri, Jun 24, 2011 at 11:27 AM, rajeev bharshetty > > wrote:

Re: [algogeeks] Re: Queue to support insert , delete, find max in o(1)

2011-06-24 Thread Piyush Sinha
ohh sorry, my bad..I missed that issue...then we can use the same logic of using one more stack that we use for implementing modified stack keeping track of the min()..I hope this will solve the issue On Fri, Jun 24, 2011 at 3:57 PM, ross wrote: > @piyush, > Dude, how will that make findmin(

[algogeeks] Re: Queue to support insert , delete, find max in o(1)

2011-06-24 Thread ross
@piyush, Dude, how will that make findmin() to be O(1) because, once the minimum element is deleted, u would require changes in the others .. Correct me if i am wrong.. Eg: consider inserting, 1 5 6 7 9 in order into the circular LL. When u make each node keep track of the minm before it, all will

Re: [algogeeks] Queue to support insert , delete, find max in o(1)

2011-06-24 Thread Piyush Sinha
Can we use circular linked list with each new inserted node keeping track of the minimum before it?? On Fri, Jun 24, 2011 at 3:20 PM, ross wrote: > Hi, > I know that a stack can be modified with another stack to support push > pop min in const time. > Design a FIFO data structure to support ins

[algogeeks] Queue to support insert , delete, find max in o(1)

2011-06-24 Thread ross
Hi, I know that a stack can be modified with another stack to support push pop min in const time. Design a FIFO data structure to support ins, del, and find min in O(1). Extra space allowed. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To

Re: [algogeeks] Re: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-06-24 Thread murthy.krishn...@gmail.com
yaa If any one has it, can you please mail it to me also Thanks, On Fri, Jun 24, 2011 at 2:36 PM, alok kediya wrote: > any one downloaded or having link to download link, plz share it with me.. > thanks in advance :) > > Thanks, > Alok > > On Thu, Jun 23, 2011 at 10:58 PM, Bhavesh agrawal > wr

Re: [algogeeks] Re: If any one have algorithms for interviews by adnan aziz ebook... Please mail ...

2011-06-24 Thread alok kediya
any one downloaded or having link to download link, plz share it with me.. thanks in advance :) Thanks, Alok On Thu, Jun 23, 2011 at 10:58 PM, Bhavesh agrawal wrote: > mail it to me plz.. > > agr.bhav...@gmail.com > > -- > You received this message because you are subscribed to the Google Groups

Re: [algogeeks] [Brain Teaser] Sherlock puzzle 24 June

2011-06-24 Thread Anika Jain
she died out of shock or heart attack.. On Fri, Jun 24, 2011 at 12:46 PM, Vishal Thanki wrote: > she got killed because of suffocation :P > > On Fri, Jun 24, 2011 at 12:35 PM, Lavesh Rawat > wrote: > > sherlock puzzle Solution - 24 june > > > > A wife and her husband were driving in their car on

Re: [algogeeks] without sizeof

2011-06-24 Thread Anika Jain
hm.. thanx everyone.. On Fri, Jun 24, 2011 at 2:43 AM, D!leep Gupta wrote: > #include > main() > { > long double *var; > printf("%d",(char*)(var+1)-(char*)var); > return 0; > } > > This also may be the solution... by taking the pointer of that variable... > > On Fri, Jun 24, 2011 at 2:09 AM, vaib

Re: [algogeeks] [Brain Teaser] Sherlock puzzle 24 June

2011-06-24 Thread Vishal Thanki
she got killed because of suffocation :P On Fri, Jun 24, 2011 at 12:35 PM, Lavesh Rawat wrote: > sherlock puzzle Solution - 24 june > > A wife and her husband were driving in their car on the highway. All of a > sudden, they ran out of gas. So the husband said to the wife, 'Now, you stay > here.