data structures - Find second minimum - algorithm -
i want find second minimum 3 numbers.
i have blackbox gets 2 input numbers, blackbox returns max between numbers.
additionally, have blackbox returns min.
now have box gets 3 numbers input , needs return second min.
can me solve this? how can solve using 2 blackboxes?
thanks!
i can see of way to 3 uses of blackbox. let's pretend each element a,b,c. find min of b , b c. find max of 2 answers , have second min. if b returned, find min of , c.
Comments
Post a Comment