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
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
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;
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)
=
--
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
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
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
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)
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