here is a rough sketch
its missing the ending condition
Mikum(A,q,r)
k1=A[k/2]
Type: Posts; User: henri
here is a rough sketch
its missing the ending condition
Mikum(A,q,r)
k1=A[k/2]
here is a rough sketch
its missing the ending condition
Mikum(A,q,r)
k1=A[k/2]
k2=B[k/2]
ok but as you see my time is logaritmic which screams
recursive calls
did you see my recursive method?
its the key because only double recursion will get O(log ..)
in "randomised select"...
ok but as you see my time is logaritmic which screams
recursive calls
did you see my recursive method?
its the key because only double recursion will get O(log ..)
in "randomised select"...
the problem is findind the k'smallest in the big 2n array
i know that its between k1 and k2 where k2>k1
so i did recursive calls is the code to look the areas from index of 0 till k1
and...
itsme86
the problem is findind the k'smallest in the big 2n array
i know that its between k1 and k2 where k2>k1
so i did recursive calls is the code to look the areas from index of 0 till k1...
ok i have reported your posts to the admin
and i will keep posting my question
in the end on top of your trolling posts
Commnotater stop posting in this thread
i have two arrays ,each of size n, which are sorted.
write an algorithm that finds the k'th smallest amongst the array of size 2n which is the resolt...
i have change my original posts and added description .
common man you are totally insoltive and clearly lack the knowledge about time complexity
pls stop waisting my and your time with posting...
i have two arrays ,each of size n, which are sorted.
write an algorithm that finds the k'th smallest amongst the array of size 2n which is the resolt of sticking those two together
in O(lg min...
you are not specific at all
have
you read my posts so far
?
ok did you understand my problem?
did you understand my theoretical idea?
i explained it as much as i could
i need help to finsh it
the word sum was measleading
i ment sticking two arrays together making one big array of size 2n
now you understand my idea ?
do you see what i amtrying to do in the code?
the word sum was measleading
i ment sticking two arrays together making one big array of size 2n
now you understand my idea ?
do you see what i amtrying to do in the code?
could you help me develop my idea i posted?
i have written a description of my problem
and the code i have tried to write
if you dont understand my idea please tell
could you help me with the...
sorry
by sum i mean
a big array where we put them side by side
for example
1,2,3
4,5,6
write an algorithm for which
the input is n pairs on whole positive numbers:
(x1,w1),..,(xn,wn)
and number k.
the output is the k smallest in a list
where xi appears wi times
for example:...
i have two arrays ,each of size n, which are sorted.
write an algorithm that finds the k'th smallest amongst the "sum" of the two arrays
in O(lg min (k,2n-k))
i have this idea of how to...
i know that should use binary search because it uses O(lgn)
but when i put in the partition i gets O(nlgn)
so here i get the problem
?
i know that this forum is very active in C programming...
your lecture is the theory in my book
i know it
but it doesnt help me with the question
the arrays are of the same size n A[1..n] and B[1..n]
n is some number. the number of members in the super array is 2n.
in my book when we find the member i'th smallest in the array we use...
two sorted arrays are stuck together into one big array.
find an algorithm for which we find the "i" "order statistic" of this array
in runtime complexity of O(lg min(k,2n-k))
??
i have read...
there is T a binary tree, for each z node (not a leaf) we define
NPL(z) (null path length) as the length of the shortest path from the node to the leaf.
we add npl[z] to each node.
binary tree T...
there is T a binary tree, for each z node (not a leaf) we define
NPL(z) (null path length) as the length of the shortest path from the node to the leaf.
we add npl[z] to each node.
binary tree T...
there is T a binary tree, for each z node (not a leaf) we define
NPL(z) (null path length) as the length of the shortest path from the node to the leaf.
we add npl[z] to each node.
binary tree T...