Re: [algogeeks] Finding the indexes of a repeated element??

2011-11-09 Thread surender sanke
this finds first and last index in pair structure in logn void repindxs(int array[],int start, int end, int k, pairint, int *p, int n/*last index*/) { if(startend) return ; int m = (start+end)/2; if( array[m] == k (m-10?-1:array[m-1] k) ) p-first = m; else if(array[m] k || (array[m]==k

Re: [algogeeks] Does anyone know the written pattern of Amazon??

2011-11-09 Thread rahul sharma
hey in our college this is the procedure for internship...n ppo is ther based on profromance On Tue, Nov 8, 2011 at 10:03 PM, kumar raja rajkumar.cs...@gmail.comwrote: Thanks rahul On 8 November 2011 03:32, rahul sharma rahul23111...@gmail.com wrote: apti + technical + 3 prog (mainly

Re: [algogeeks] Re: Array Problem??

2011-11-09 Thread sagar sindwani
B[n]=0; for i=n to 1 { if(A[i-1]=A[i]) B[i-1]=B[i]; else B[i-1]=B[i]+1; } O(n) solution. Correct me if I am wrong. On Tue, Oct 4, 2011 at 2:07 PM, anshu mishra anshumishra6...@gmail.comwrote: int count(int x, int tree[], int s, int e, int n) { tree[n]++; if (s==e) return 0; int cnt = 0;

Re: [algogeeks] Does anyone know the written pattern of Amazon??

2011-11-09 Thread rahul patil
once i had appeared to amazon interview, questions are as follows, Hello all, These are the questions for Amazon interview i faced on last Saturday. == === 1st Round -- written (coding) =

[algogeeks] what will be the focus of yahoo in written exam ,what to study for it. please respond ASAP..

2011-11-09 Thread kumar raja
-- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- 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] Facebook Online Question India

2011-11-09 Thread Decipher
This question was asked by Facebook during their 2 hour online exam (Only 1 question in 2 hour as per my junior) in DCE. Given a list of words wordlist on 1st line (no of words = 100) and a string qstr of len = 1 million on 2nd line, print the index at qstr where a continuous substring exists

Re: [algogeeks] what will be the focus of yahoo in written exam ,what to study for it. please respond ASAP..

2011-11-09 Thread rahul sharma
i also want to knw...somebody who has faced yahoo this year plz post. On Wed, Nov 9, 2011 at 11:50 PM, kumar raja rajkumar.cs...@gmail.comwrote: -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the

Re: [algogeeks] Facebook Online Question India

2011-11-09 Thread rahul sharma
facebook visit DCE???wats package??? On Wed, Nov 9, 2011 at 9:22 PM, Decipher ankurseth...@gmail.com wrote: This question was asked by Facebook during their 2 hour online exam (Only 1 question in 2 hour as per my junior) in DCE. Given a list of words wordlist on 1st line (no of words = 100)

Re: [algogeeks] Re: Array Problem??

2011-11-09 Thread Ramakant Sharma
for second part maintain an array of c[n-1] elements initialized to 1. for given count in B[i] from i=o,start counting 1's in c. at that (count)==b[i]+1,assume at c[j] set c[j]=0 and a[i]=j; its O(n2) :-( -- You received this message because you are subscribed to the Google Groups