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

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -