[algogeeks] Yahoo coding round question

2010-10-19 Thread Abhishek Kumar Singh
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

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread rahul patil
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. --

[algogeeks] hello k

2010-10-19 Thread Asif Iqbal
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

Re: [algogeeks] Algorithm to determine the largest number of envelopes that can be nested inside one another.

2010-10-19 Thread Wladimir Tavares
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

Re: [algogeeks] Algorithm to determine the largest number of envelopes that can be nested inside one another.

2010-10-19 Thread Wladimir Tavares
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

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread Kishen Das
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

[algogeeks] Immediate Hire - SAP OM/PA Consultant - OH - 6 months contract - $65/Hr on C2C

2010-10-19 Thread hassan ali
*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:

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread abhishek singh
@ 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

[algogeeks] 4th year project ideas

2010-10-19 Thread Ayush Mittal
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

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread Kishen Das
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

Re: [algogeeks] Yahoo coding round question

2010-10-19 Thread MOHIT ....
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

Re: [algogeeks] 4th year project ideas

2010-10-19 Thread Surendra Gupta
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

Re: [algogeeks] Re: Modify Queue Data Structure which returns min in O(1) time.

2010-10-19 Thread Saurabh Koar
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