Comparing 1024 numbers - Part 1

The computer is storing 1024 (distinct) numbers.
You can choose any 2, and it will tell you which number is larger and which is smaller.

What is the minimum number of comparisons that you need in order to find the maximum of these 1024 numbers?


The answer is 1023.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Vighnesh Raut
Feb 28, 2015

As we have to find the number of comparisons to find the largest number among 1024 numbers we have to eliminate 1023 numbers for which it requires 1023 comparisons..Also no two numbers are related to each other, so we can't eliminate 2 or more numbers by only one comparison.. Hence, minimum number is 1023

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...