[algogeeks] Yahoo coding round question
Given an array of length N. How will you find the minimum length contiguous sub - array of whose sum is S and whose product is P . Here S and P will be given to you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
Re: [algogeeks] Yahoo coding round question
Does array consists of negative nos? On Tue, Oct 19, 2010 at 1:28 PM, Abhishek Kumar Singh iiita2007...@gmail.com wrote: Given an array of length N. How will you find the minimum length contiguous sub - array of whose sum is S and whose product is P . Here S and P will be given to you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- Regards, Rahul Patil -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
[algogeeks] hello k
hello Friend: I have good news for you. Last week I have Order china 18 Products Samsung UN55B8000 55-Inch 1080p 240Hz LED HDTV w e b: moaoeso.com I have received the product! It's amazing! The item is original, brand new and has high quality, but it's muc cheaper. I'm pleased to share this good news with you! I believe you will find what you want there and have an good experience on shopping from them Regards! 熔 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
Re: [algogeeks] Algorithm to determine the largest number of envelopes that can be nested inside one another.
You can order the envelopes by area! Wladimir Araujo Tavares http://www.si.ufc.br/~wladimir http://www.si.ufc.br/%7Ewladimir/ Fiz uma faculdade! Só não fiz a segunda porque acabaram os tijolos. On Tue, Oct 19, 2010 at 11:23 AM, Wladimir Tavares wladimir...@gmail.comwrote: This problem is a variation of Longest Increasing Subsequence (LIS). The faster algorithm é O(n log n) http://en.wikipedia.org/wiki/Longest_increasing_subsequence http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence Wladimir Araujo Tavares http://www.si.ufc.br/~wladimir http://www.si.ufc.br/%7Ewladimir/ Fiz uma faculdade! Só não fiz a segunda porque acabaram os tijolos. On Mon, Oct 18, 2010 at 7:53 PM, Marcelo Amorim Menegali mmeneg...@gmail.com wrote: The problem statement doesn't make it clear, but I guess one can rotate the envelopes (i.e. exchange x_i and y_i). I mean, in the example case of {(1,2),(2,13),(5,10),(7,9),(9,1)}, isn't (1,2),(1,9),(5,10) a valid solution (with length 3), instead of the ones shown (with length 2)? On Sat, Oct 16, 2010 at 5:40 PM, nishaanth nishaant...@gmail.com wrote: ya...finding the longest subsequence is the simplest method...and its nlogn.. It works...it similar to box stacking problem On Fri, Oct 1, 2010 at 6:00 AM, adit.sh...@gmail.com adit.sh...@gmail.com wrote: The problem here is more about finding the most optimal solution and not just solution. Rgds Adi -Original Message- From: Sathaiah Dontula Sent: 29/09/2010, 09:25 To: algogeeks@googlegroups.com Subject: Re: [algogeeks] Algorithm to determine the largest number of envelopes that can be nested inside one another. I think we can do like this, 1. Sort all the xi's in ascending order - nlog(n) 2. Then find the longest increasing sequence of yi's - nlog(n) 3. complexity will be nlog(n). Thanks, Sathaiah Dontula On Tue, Sep 28, 2010 at 11:37 PM, Prashant Kulkarni prashant.r.k...@gmail.com wrote: i think it is similar to finding max in a list O(n) or sorting algorithm O(n log n) -- Prashant Kulkarni On Tue, Sep 28, 2010 at 11:33 PM, Rahul Singal rahulsinga...@gmail.comwrote: A possible solution i can think is create a directed graph where each vertex is a envelope and edges are from a bigger envelope to smaller envelope ( one which can fit in bigger envelope ) . Now the problem is reduce to finding longest path in the graph . Regards Rahul -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com algogeeks%2bunsubscr...@googlegroups.comalgogeeks%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com algogeeks%2bunsubscr...@googlegroups.comalgogeeks%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- S.Nishaanth, Computer Science and engineering, IIT Madras. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more
Re: [algogeeks] Algorithm to determine the largest number of envelopes that can be nested inside one another.
This problem is a variation of Longest Increasing Subsequence (LIS). The faster algorithm é O(n log n) http://en.wikipedia.org/wiki/Longest_increasing_subsequence http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence Wladimir Araujo Tavares http://www.si.ufc.br/~wladimir http://www.si.ufc.br/%7Ewladimir/ Fiz uma faculdade! Só não fiz a segunda porque acabaram os tijolos. On Mon, Oct 18, 2010 at 7:53 PM, Marcelo Amorim Menegali mmeneg...@gmail.com wrote: The problem statement doesn't make it clear, but I guess one can rotate the envelopes (i.e. exchange x_i and y_i). I mean, in the example case of {(1,2),(2,13),(5,10),(7,9),(9,1)}, isn't (1,2),(1,9),(5,10) a valid solution (with length 3), instead of the ones shown (with length 2)? On Sat, Oct 16, 2010 at 5:40 PM, nishaanth nishaant...@gmail.com wrote: ya...finding the longest subsequence is the simplest method...and its nlogn.. It works...it similar to box stacking problem On Fri, Oct 1, 2010 at 6:00 AM, adit.sh...@gmail.com adit.sh...@gmail.com wrote: The problem here is more about finding the most optimal solution and not just solution. Rgds Adi -Original Message- From: Sathaiah Dontula Sent: 29/09/2010, 09:25 To: algogeeks@googlegroups.com Subject: Re: [algogeeks] Algorithm to determine the largest number of envelopes that can be nested inside one another. I think we can do like this, 1. Sort all the xi's in ascending order - nlog(n) 2. Then find the longest increasing sequence of yi's - nlog(n) 3. complexity will be nlog(n). Thanks, Sathaiah Dontula On Tue, Sep 28, 2010 at 11:37 PM, Prashant Kulkarni prashant.r.k...@gmail.com wrote: i think it is similar to finding max in a list O(n) or sorting algorithm O(n log n) -- Prashant Kulkarni On Tue, Sep 28, 2010 at 11:33 PM, Rahul Singal rahulsinga...@gmail.comwrote: A possible solution i can think is create a directed graph where each vertex is a envelope and edges are from a bigger envelope to smaller envelope ( one which can fit in bigger envelope ) . Now the problem is reduce to finding longest path in the graph . Regards Rahul -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com algogeeks%2bunsubscr...@googlegroups.comalgogeeks%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com algogeeks%2bunsubscr...@googlegroups.comalgogeeks%252bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- S.Nishaanth, Computer Science and engineering, IIT Madras. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to
Re: [algogeeks] Yahoo coding round question
Lets say A is the array of length N. Create an array sum of length N and initialize it to 0. Create an array product of length N and initialize it to 1. for ( i=0 to i=N-1 ) { for ( j = i to j = 0 ) { sum[j] = sum[j] + A[ i] product[j]= product[j] * A [i] } for( k=0 to k= i ) if ( sum[k] == S and product[k] == P ) { Answer is the sub array A[k to i ] break } } Kishen On Tue, Oct 19, 2010 at 2:58 AM, Abhishek Kumar Singh iiita2007...@gmail.com wrote: Given an array of length N. How will you find the minimum length contiguous sub - array of whose sum is S and whose product is P . Here S and P will be given to you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
[algogeeks] Immediate Hire - SAP OM/PA Consultant - OH - 6 months contract - $65/Hr on C2C
*Dear Partner, Hope you are doing well!* *Please send resumes to* *a...@panzersolutions.com*a...@panzersolutions.com *Job Title : SAP OM/PA Consultant Location : OH Duration : 6 months Contract* *Rate : $65/Hr on C2C Max.* *Key skills required: *Organizational Management (OM) experience SAP HR experience Personnel Administration (PA) experience. The present OM role requires some knowledge of LSMW. Thanks, Ali Technical Recruiter Panzer Solutions -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
Re: [algogeeks] Yahoo coding round question
@ Rahul patil ofcourse array may have negative or positive integers @ Kishen both O(n) and O(n logn) solutions was asked in this yahoo coding round question On Tue, Oct 19, 2010 at 1:28 PM, Abhishek Kumar Singh iiita2007...@gmail.com wrote: Given an array of length N. How will you find the minimum length contiguous sub - array of whose sum is S and whose product is P . Here S and P will be given to you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ABHISHEK KUMAR SINGH BTECH (INFORMATION TECHNOLOGY) IIIT ALLAHABAD 9956640538 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
[algogeeks] 4th year project ideas
hello friends. plz suggest some new ideas for java projects for IT 4th year -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
Re: [algogeeks] Yahoo coding round question
In the below code the jth and kth inner for loops can be run in parallel making them O(1) and the entire thing O(n). for ( i=0 to i=N-1 ) { for ( j = i to j = 0 ) { sum[j] += A[ i] product[j] *= A [ i] } for( k=0 to k= i ) if ( sum[k] == S and product[k] == P ) { Answer is the sub array A[k to i ] break } } Kishen On Tue, Oct 19, 2010 at 11:36 AM, abhishek singh iiita2007...@gmail.comwrote: @ Rahul patil ofcourse array may have negative or positive integers @ Kishen both O(n) and O(n logn) solutions was asked in this yahoo coding round question On Tue, Oct 19, 2010 at 1:28 PM, Abhishek Kumar Singh iiita2007...@gmail.com wrote: Given an array of length N. How will you find the minimum length contiguous sub - array of whose sum is S and whose product is P . Here S and P will be given to you. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- ABHISHEK KUMAR SINGH BTECH (INFORMATION TECHNOLOGY) IIIT ALLAHABAD 9956640538 -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
Re: [algogeeks] Yahoo coding round question
o(n) soln Lets say A is the array of length N. Create an array sum of length N and initialize it to 0. Create an array product of length N and initialize it to 1. now sum[i]=sum[i-1]+A[i]; sum[0]=A[0]; product[i]=product[i-1]+A[I]product[0]=A[0]; make a two hash table for product and sum array ; in product arrary traverse i=0 to n ; divide result=product[i]/P and check result is present in hash table or not if yes then get index of result . suppose k then checkabsolute(sum[i]-sum[k])==S if yes then we got sub array. else ..keep do this untill array end ; -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
Re: [algogeeks] 4th year project ideas
You are in wrong group. On Wed, Oct 20, 2010 at 4:20 AM, Ayush Mittal ayushmittal2...@gmail.comwrote: hello friends. plz suggest some new ideas for java projects for IT 4th year -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.
Re: [algogeeks] Re: Modify Queue Data Structure which returns min in O(1) time.
Why u people r going for implementing Queue using Stacks?? As Rahul Suggested in second thread can't this problem be solved by Priority Queue that uses Min Heap functions It clearly takes O(1) time for extracting minimum element.. -- Thanks Regards Saurabh Koar Final Year Under Graduate Student Computer Science and Engineering NIT Durgapur India -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@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.