<<

Topic 24 sorting and searching arrays "There's nothing in your head the sorting hat can't see. So try me on and I will tell you where you ought to be." -The Sorting Hat, Harry Potter and the Sorcerer's Stone

1 WNBA Standings Billboard Hot 100 Largest Metropolitan Areas What do these all have in common? They’re lists of data.

We can search through these lists to find something we seek. You’re tracking ID numbers of 200 students enrolled in a class.

57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379, 80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108, 81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912, 10715875, 68172776, 60764740 People keep asking you to look up whether a particular ID number is in the list.

Is a student with ID Aaaarrrgggh! 49457283 enrolled in the class?

How about 39585207?

57439046? People keep asking you to look up whether a particular ID number is in the list.

There’s gotta be a better way to search for these numbers! People keep asking you to look up whether a particular ID number is in the list.

Can I make a computer do this for me? Can I write a program to search the huge list of ID numbers? Well, we could put the ID numbers into a program…. id_numbers_list = [57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379,80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108,81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912,10715875, 68172776, 60764740] Well, how would you find a number, say 18834841, in real life?

id_numbers_list = [57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379,80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108,81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912,10715875, 68172776, 60764740] Is a[0] == 18834841? No.

id_numbers_list = [57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379,80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108,81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912,10715875, 68172776, 60764740] Is a[1] == 18834841? No.

id_numbers_list = [57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379,80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108,81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912,10715875, 68172776, 60764740] Is a[2] == 18834841? No.

id_numbers_list = [57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379,80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108,81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912,10715875, 68172776, 60764740] ….keep going until….

id_numbers_list = [57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379,80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108,81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912,10715875, 68172776, 60764740] Is a[125] == 18834841? Yes!

id_numbers_list = [57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379,80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108,81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912,10715875, 68172776, 60764740] So, 18834841 is at index 125; 125 spots over from the first number, i.e., the 126th number in the list. id_numbers_list = [57653291, 77974202, 48255064, 50207222, 64327022, 124359, 63817496, 58405436, 25849336, 2472481, 75132998, 75157472, 17504896, 44628635, 71803121, 60578923, 39500049, 80927192, 6013783, 1753947, 41600085, 63630375, 27411604, 2266772, 1876442, 70037639, 16791517, 3405289, 38008671, 26822328, 826108, 93585196, 57231458, 80432166, 15898393, 325166, 27182396, 9980623, 52043583, 46417853, 75067816, 93080379,80006753, 63763649, 70163825, 75992680, 83819701, 41048764, 69114073, 42204250, 81387373, 56124523, 95869383, 41128399, 81794220, 31352781, 72159769, 3180908, 35393222, 21608155, 90427286, 14141847, 9465016, 55643749, 42230760, 71764328, 12688576, 7962189, 42378930, 76296176, 80671990, 46498407, 32040088, 84436740, 79974249, 83114317, 93258187, 90886474, 15092431, 13525665, 28427034, 81774244, 74116912, 67661230, 68114047, 86052223, 41107776, 68254428, 32185835, 77720864, 39574223, 50496301, 71770551, 29904350, 32018874, 17487375, 96645404, 8932932, 68504204, 31471516, 82736372, 50993878, 79981976, 69678695, 73837172, 89450303, 65252607, 63400970, 38338141, 37064007, 692899, 56662000, 33776992, 41824071,15276083, 83279627, 91988800, 56678667, 60166494, 5920219, 36514409, 91794150, 23430314, 92924419, 10987159, 18834841, 19683736, 85098330, 33649023, 68054688, 99470738, 28355571, 43342771, 59546955, 44973645, 80164480, 17362473, 61913631, 93718882, 10426440, 24730250, 7626153, 55752830, 36316758, 82135131, 8991920, 1189936, 3999980, 5085935, 80025899, 37921450, 61990737, 88409230, 10762169, 4863131, 48520540, 71301552, 99393961, 57937674, 37254359, 85368896, 73346077, 32675274, 2453304, 88257335, 95397732, 60620609, 95214574, 17415138, 60348442, 97989270, 54893057, 73070608, 84727623, 95534022, 97461108,81359424, 79361707, 54451332, 71460551, 5904284, 71341587, 23894936, 80948727, 13731268, 14398208, 24830512, 719995, 28999931, 78135920, 95488848, 17888747, 2742387, 8487108, 22003990, 49669459, 6384912,10715875, 68172776, 60764740] Searching Given an array of ints find the index of the first occurrence of a target int

index 0 1 2 3 4 5 value 89 0 27 -5 42 11 Given the above array and a target of 27 the method returns 2 What if not present? What if more than one occurrence?

5 clicker Given an array with 1,000,000 distinct elements in random order, how many elements do you expect to look at (on average) when searching if: item present item not present A. 1 1,000,000 B. 500,000 1,000,000 C. 1,000,000 1,000,000 D. 1,000 500,000 E. 20 1,000,000 6 Yum yum…. pie with 7 slices Pie monster #1 likes to eat the pie 1 slice at a time.

Start with 7 slices. Eat 1 slice → 6 slices left. Eat 1 slice → 5 slices left. Eat 1 slice → 4 slices left. Eat 1 slice → 3 slices left. Eat 1 slice → 2 slices left. Eat 1 slice → 1 slice left. Stop. Save a slice for your friend. Pie monster #2 likes to eat half the pie at a time.

Start with 7 slices. Pie monster #2 likes to eat half the pie at a time.

Start with 7 slices.

Eat half the pie → …. Pie monster #2 doesn’t like fractions of slices.

Start with 7 slices.

Eat half the pie & throw away fraction of slice → 3 slices left. Pie monster #2 doesn’t like fractions of slices.

Start with 7 slices.

Eat half the pie & throw away fraction of slice → 3 slices left.

Eat half the pie …. Pie monster #2 doesn’t like fractions of slices.

Start with 7 slices.

Eat half the pie & throw away fraction of slice → 3 slices left.

Eat half the pie & throw away fraction of slice → 1 slice left.

Stop. Save last slice for your friend. Pie monster #2 ate a lot faster than pie monster #1!

Start with 7 slices. Start with 7 slices. Eat 1 slice → 6 slices left. Eat 1 slice → 5 slices left. Eat half the pie & throw away fraction of Eat 1 slice → 4 slices left. slice → 3 slices left. Eat 1 slice → 3 slices left. Eat 1 slice → 2 slices left. Eat half the pie & throw away fraction of Eat 1 slice → 1 slice left. slice → 1 slice left. Stop. Save a slice for your friend. Stop. Save last slice for your friend.

6 steps to get to 1 slice. 2 steps to get to 1 slice. Pie monster math

Start with 7 slices. Eat 1 slice → 6 slices left. 7 - 1 = 6 Eat 1 slice → 5 slices left. 6 - 1 = 5 Eat 1 slice → 4 slices left. 5 - 1 = 4 Eat 1 slice → 3 slices left. 4 - 1 = 3 Eat 1 slice → 2 slices left. 3 - 1 = 2 Eat 1 slice → 1 slice left. 2 - 1 = 1 Stop. Save a slice for your friend. Pie monster math

Start with 7 slices.

7 // 2 = 3 Eat half the pie & throw away fraction of slice → 3 slices left.

3 // 2 = 1 Eat half the pie & throw away fraction of slice → 1 slice left.

Stop. Save last slice for your friend. Let’s find earnings in highest-paid list

Forbes 100 Highest-Paid Celebrities 2018 list: https://www.forbes.com/celebrities/list/3/#tab:overall

Beyoncé Knowles made $60 million in 2018. Where is she in the list? Where does she rank among the top 100? Top 100 Highest-Paid Celebrities (1 of 4) How many millions of dollars were earned ('J.K. Rowling', 54) ('', 90) ('Akshay Kumar', 40.5) ('Kylie Jenner', 166.5) ('Giannis Antetokounmpo', 35.5) ('Jimmy Garoppolo', 36.2) ('', 43.5) ('Rory McIlroy', 37.7) ('Roger Waters', 68) ('Gordon Ramsay', 62) ('', 40.5) ('Neymar', 90) ('Steve Harvey', 44) ('LeBron James', 85.5) ('Ryan Seacrest', 74) ('Trumaine Johnson', 37) ('Billy Joel', 43.5) ('Imagine Dragons', 36.5) ('Paul McCartney', 47.5) ('Lionel Messi', 111) ('Foo Fighters', 47) ('Salman Khan', 37.7) ('Conor McGregor', 99) ('Von Miller', 35.1) ('Robert Downey Jr.', 81) ('Sebastian Vettel', 42.3) Top 100 Highest-Paid Celebrities (2 of 4)

('Russell Westbrook', 47.5) ('Drew Brees', 42.9) ('Judy Sheindlin', 147) ('Beyonce Knowles', 60) ('The Chainsmokers', 45.5) ('James Harden', 46.4) ('Dr. Dre', 35) ('Sean Combs', 64) ('Canelo Alvarez', 44.5) ('Dr. Phil McGraw', 77.5) ('Alex Smith', 41.4) ('The Eagles', 56) ('Cristiano Ronaldo', 108) ('', 37.5) ('Derek Carr', 42.1) ('Luke Bryan', 52) ('George Clooney', 239) ('Rolling Stones', 39) ('Tiger Woods', 43.3) ('', 42) ('Phil Mickelson', 41.3) ('Floyd Mayweather', 285) ('', 35) ('Matt Ryan', 67.3) ('Bruce Springsteen', 37.5) ('Blake Griffin', 35.5) Top 100 Highest-Paid Celebrities (3 of 4)

('', 47) ('', 47) ('Jay-Z', 76.5) ('Lady Gaga', 50) ('Elton John', 46) ('Pink', 52) ('Garth Brooks', 45.5) ('', 57) ('Kevin Hart', 57) ('Depeche Mode', 53) ('', 45.5) ('Ed Sheeran', 110) ('Dwayne Johnson', 124) ('Chris Hemsworth', 64.5) ('Metallica', 46) ('Coldplay', 115.5) ('Taylor Swift', 80) ('Bruno Mars', 100) ('Ellen DeGeneres', 87.5) ("Guns N' Roses", 71) ('Ryan Tannehill', 35.2) ('Rihanna', 37.5) ('Stephen Curry', 76.9) ('David Copperfield', 62) ('Anthony Joshua', 39) ('Rafael Nadal', 41.4) Top 100 Highest-Paid Celebrities (4 of 4)

('J. Cole', 35.5) ('Kevin Durant', 53.7) ('Rush Limbaugh', 84.5) ('', 83) ('Jordan Spieth', 41.2) ('Kenny Chesney', 37) ('James Patterson', 86) ('Damian Lillard', 39.2) ('Jerry Seinfeld', 57.5) ('', 39.5) ('Lewis Hamilton', 51) ('', 58) ('Sofia Vergara', 42.5) ('Dave Chappelle', 35) ('Sean Hannity', 36) ('Calvin Harris', 48) ('Kim Kardashian West', 67) ('U2', 118) ('Kyrie Irving', 36.1) ('Jimmy Buffet', 51) ('Matthew Stafford', 59.5) ('Roger Federer', 77.2) Let’s find earnings in highest-paid celebrities list

Forbes 100 Highest-Paid Celebrities 2018 list: https://www.forbes.com/celebrities/list/3/#tab:overall

Beyoncé Knowles made $60 million in 2018. Where is she in the list? Where does she rank among the top 100?

Jennifer Lopez made $47 million in 2018. Where is she in the list? Where does she rank among the top 100? Let’s find earnings in highest-paid celebrities list

Forbes 100 Highest-Paid Celebrities 2018 list: https://www.forbes.com/celebrities/list/3/#tab:overall

Beyoncé Knowles made $60 million in 2018. Where is she in the list? Where does she rank among the top 100?

Jennifer Lopez made $47 million in 2018. Where is she in the list? Where does she rank among the top 100?

Well, this sure does take a while, doesn’t it?!! How can we make this go faster? What if the list was in order? What if the list is sorted by earnings

Top 100 Highest-Paid Celebrities (1 of 4) Sorted by earnings ('Floyd Mayweather', 285) ('Howard Stern', 90) ('George Clooney', 239) ('Ellen DeGeneres', 87.5) ('Kylie Jenner', 166.5) ('James Patterson', 86) ('Judy Sheindlin', 147) ('LeBron James', 85.5) ('Dwayne Johnson', 124) ('Rush Limbaugh', 84.5) ('U2', 118) ('Katy Perry', 83) ('Coldplay', 115.5) ('Robert Downey Jr.', 81) ('Lionel Messi', 111) ('Taylor Swift', 80) ('Ed Sheeran', 110) ('Dr. Phil McGraw', 77.5) ('Cristiano Ronaldo', 108) ('Roger Federer', 77.2) ('Bruno Mars', 100) ('Stephen Curry', 76.9) ('Conor McGregor', 99) ('Jay-Z', 76.5) ('Neymar', 90) ('Ryan Seacrest', 74)

Top 100 Highest-Paid Celebrities (2 of 4) Sorted by earnings ("Guns N' Roses", 71) ('The Weeknd', 57) ('Roger Waters', 68) ('The Eagles', 56) ('Matt Ryan', 67.3) ('J.K. Rowling', 54) ('Kim Kardashian West', 67) ('Kevin Durant', 53.7) ('Chris Hemsworth', 64.5) ('Depeche Mode', 53) ('Sean Combs', 64) ('Luke Bryan', 52) ('David Copperfield', 62) ('Pink', 52) ('Gordon Ramsay', 62) ('Jimmy Buffet', 51) ('Beyonce Knowles', 60) ('Lewis Hamilton', 51) ('Matthew Stafford', 59.5) ('Lady Gaga', 50) ('Kendrick Lamar', 58) ('Calvin Harris', 48) ('Jerry Seinfeld', 57.5) ('Paul McCartney', 47.5) ('Kevin Hart', 57) ('Russell Westbrook', 47.5)

Top 100 Highest-Paid Celebrities (3 of 4) Sorted by earnings ('Drake', 47) ('Tiger Woods', 43.3) ('Foo Fighters', 47) ('Drew Brees', 42.9) ('Jennifer Lopez', 47) ('Sofia Vergara', 42.5) ('James Harden', 46.4) ('Sebastian Vettel', 42.3) ('Elton John', 46) ('Derek Carr', 42.1) ('Metallica', 46) ('Will Smith', 42) ('Garth Brooks', 45.5) ('Rafael Nadal', 41.4) ('Jackie Chan', 45.5) ('Alex Smith', 41.4) ('The Chainsmokers', 45.5) ('Phil Mickelson', 41.3) ('Canelo Alvarez', 44.5) ('Jordan Spieth', 41.2) ('Steve Harvey', 44) ('Scarlett Johansson', 40.5) ('Simon Cowell', 43.5) ('Akshay Kumar', 40.5) ('Billy Joel', 43.5) ('Adam Sandler', 39.5)

Top 100 Highest-Paid Celebrities (4 of 4) Sorted by earnings ('Damian Lillard', 39.2) ('Sean Hannity', 36) ('Anthony Joshua', 39) ('Giannis Antetokounmpo', 35.5) ('Rolling Stones', 39) ('J. Cole', 35.5) ('Salman Khan', 37.7) ('Blake Griffin', 35.5) ('Rory McIlroy', 37.7) ('Ryan Tannehill', 35.2) ('Kris Jenner', 37.5) ('Von Miller', 35.1) ('Rihanna', 37.5) ('Dave Chappelle', 35) ('Bruce Springsteen', 37.5) ('Dr. Dre', 35) ('Kenny Chesney', 37) ('Nas', 35) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) Top 100 Highest-Paid Celebrities (sorted)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35) Top 100 Highest-Paid Celebrities (sorted)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

Beyoncé Knowles made $60 million in 2018. Where is she in the list? Where does she rank among the top 100? Linear Search--like we’ve been doing

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

Where is (Beyonce Knowles, 60) in the list? Linear Search--like we’ve been doing

(Floyd Mayweather, 285)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35) Linear Search--like we’ve been doing

Is this (Beyonce Knowles, 60)? No. (Floyd Mayweather, 285)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35) Linear Search--like we’ve been doing

(George Clooney, 239)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35) Linear Search--like we’ve been doing

Is this (Beyonce Knowles, 60)? No. (George Clooney, 239)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35) Linear Search--like we’ve been doing

(Kylie Jenner, 166.5)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35) Linear Search--like we’ve been doing

Is this (Beyonce Knowles, 60)? No. (Kylie Jenner, 166.5)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35) Linear Search--like we’ve been doing

Is this (Beyonce Knowles, 60)? No. (Kylie Jenner, 166.5)

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

UGH, THIS IS TAKING A WHILE! IS THERE A FASTER WAY TO SEARCH? Binary Search

A Faster Way to Search Ordered Lists Remember, these are numbered, in order….

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

1. (Floyd Mayweather, 285) 100. (Nas, 35) So, jump to the middle of the list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

1. (Floyd Mayweather, 285) 100. (Nas, 35)

50. (Calvin Harris, 48)

middle = (1 + 100) // 2 = 101 // 2 = 50 Is (Beyonce Knowles, 60) ahead of or behind #50?

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

50. (Calvin Harris, 48)

Beyoncé earned $60 million, which is more than the $48 million Calvin Harris earned. So she is ahead of Calvin Harris in the list. Look in the first half of the list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

50. (Calvin Harris, 48)

So, we know Beyoncé is somewhere in this section of the list, ahead of Calvin Harris. Look in the first half of the list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

So, we know Beyoncé is somewhere in this section of the list, ahead of Calvin Harris. Where is (Beyonce Knowles, 60)?

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

1. (Floyd Mayweather, 285) 49. (Lady Gaga, 50)

25. (Jay-Z, 76.5) middle = (1 + 49) // 2 = 50 // 2 = 25 Where is (Beyonce Knowles, 60)?

Beyoncé is somewhere in this section of the list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

1. (Floyd Mayweather, 285) 49. (Lady Gaga, 50)

25. (Jay-Z, 76.5) Now, search this even-smaller list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35) Find the middle of this list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

26. (Ryan Seacrest, 74) 49. (Lady Gaga, 50)

37. (Kendrick Lamar, 58)

middle = (26 + 49) // 2 = 75 // 2 = 37 Where is (Beyonce Knowles, 60)?

Beyoncé is somewhere in this section of the list. She earned more than Kendrick Lamar, but less than Ryan Seacrest.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

26. (Ryan Seacrest, 74)

37. (Kendrick Lamar, 58) Where is (Beyonce Knowles, 60)?

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

26. (Ryan Seacrest, 74) 36. (Matthew Stafford, 59.5)

31. (Chris Hemsworth, 64.5)

middle = (26 + 36) // 2 = 62 // 2 = 31 Where is (Beyonce Knowles, 60)?

Beyoncé is somewhere in this section of the list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

26. (Ryan Seacrest, 74) 36. (Matthew Stafford, 59.5)

31. (Chris Hemsworth, 64.5) Where is (Beyonce Knowles, 60)?

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

32. (Sean Combs, 64) 36. (Matthew Stafford, 59.5) Where is (Beyonce Knowles, 60)?

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

32. (Sean Combs, 64) 36. (Matthew Stafford, 59.5)

34. (Gordon Ramsay, 62)

middle = (32 + 36) // 2 = 68 // 2 = 34 Where is (Beyonce Knowles, 60)?

Beyoncé is somewhere in this section of the list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

36. (Matthew Stafford, 59.5)

34. (Gordon Ramsay, 62) Where is (Beyonce Knowles, 60)?

Beyoncé is somewhere in this section of the list.

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

35. (Beyonce Knowles, 60) 36. (Matthew Stafford, 59.5) Where is (Beyonce Knowles, 60)?

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

35. (Beyonce Knowles, 60) 36. (Matthew Stafford, 59.5)

35. (Beyonce Knowles, 60)

middle = (35 + 36) // 2 = 71 // 2 = 35 Where is (Beyonce Knowles, 60)? At Number 35!

('Floyd Mayweather', 285) ('George Clooney', 239) ('Kylie Jenner', 166.5) ('Judy Sheindlin', 147) ('Dwayne Johnson', 124) ('U2', 118) ('Coldplay', 115.5) ('Lionel Messi', 111) ('Ed Sheeran', 110) ('Cristiano Ronaldo', 108) ('Bruno Mars', 100) ('Conor McGregor', 99) ('Neymar', 90) ('Howard Stern', 90) ('Ellen DeGeneres', 87.5) ('James Patterson', 86) ('LeBron James', 85.5) ('Rush Limbaugh', 84.5) ('Katy Perry', 83) ('Robert Downey Jr.', 81) ('Taylor Swift', 80) ('Dr. Phil McGraw', 77.5) ('Roger Federer', 77.2) ('Stephen Curry', 76.9) ('Jay-Z', 76.5) ('Ryan Seacrest', 74) ("Guns N' Roses", 71) ('Roger Waters', 68) ('Matt Ryan', 67.3) ('Kim Kardashian West', 67) ('Chris Hemsworth', 64.5) ('Sean Combs', 64) ('David Copperfield', 62) ('Gordon Ramsay', 62) ('Beyonce Knowles', 60) ('Matthew Stafford', 59.5) ('Kendrick Lamar', 58) ('Jerry Seinfeld', 57.5) ('Kevin Hart', 57) ('The Weeknd', 57) ('The Eagles', 56) ('J.K. Rowling', 54) ('Kevin Durant', 53.7) ('Depeche Mode', 53) ('Luke Bryan', 52) ('Pink', 52) ('Jimmy Buffet', 51) ('Lewis Hamilton', 51) ('Lady Gaga', 50) ('Calvin Harris', 48) ('Paul McCartney', 47.5) ('Russell Westbrook', 47.5) ('Drake', 47) ('Foo Fighters', 47) ('Jennifer Lopez', 47) ('James Harden', 46.4) ('Elton John', 46) ('Metallica', 46) ('Garth Brooks', 45.5) ('Jackie Chan', 45.5) ('The Chainsmokers', 45.5) ('Canelo Alvarez', 44.5) ('Steve Harvey', 44) ('Simon Cowell', 43.5) ('Billy Joel', 43.5) ('Tiger Woods', 43.3) ('Drew Brees', 42.9) ('Sofia Vergara', 42.5) ('Sebastian Vettel', 42.3) ('Derek Carr', 42.1) ('Will Smith', 42) ('Rafael Nadal', 41.4) ('Alex Smith', 41.4) ('Phil Mickelson', 41.3) ('Jordan Spieth', 41.2) ('Scarlett Johansson', 40.5) ('Akshay Kumar', 40.5) ('Adam Sandler', 39.5) 'Damian Lillard', 39.2) ('Anthony Joshua', 39) ('Rolling Stones', 39) ('Salman Khan', 37.7) ('Rory McIlroy', 37.7) ('Kris Jenner', 37.5) ('Rihanna', 37.5) ('Bruce Springsteen', 37.5) ('Kenny Chesney', 37) ('Trumaine Johnson', 37) ('Imagine Dragons', 36.5) ('Jimmy Garoppolo', 36.2) ('Kyrie Irving', 36.1) ('Sean Hannity', 36) ('Giannis Antetokounmpo', 35.5) ('J. Cole', 35.5) ('Blake Griffin', 35.5) ('Ryan Tannehill', 35.2) ('Von Miller', 35.1) ('Dave Chappelle', 35) ('Dr. Dre', 35) ('Nas', 35)

35. (Beyonce Knowles, 60) Binary Search list

low item middle item high item Is middle item what we are looking for? If not is it more or less than the target item? (Assume lower) list

low middle high item item item and so forth… 9 Implement Binary Search 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53

10 Strategy:

Repeat until number is found, OR we determine number isn’t found: - Find middle element of array - Compare middle element to the number you’re trying to find - If number you seek == middle element, then return the middle element’s index - Otherwise, if number you seek > middle element, shorten search to all elements AFTER middle element - Otherwise, if number you seek < middle element, shorten search to all elements BEFORE middle element If number was not found, return -1 public class Cs312 { public static void main(String[] args) { int[] a = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53}; System.out.println(binarySearch(a, 4)); // prints -1 System.out.println(binarySearch(a, 19)); // prints 7 }

public static int binarySearch(int[] a, int numberToFind) { int first = 0; int last = a.length - 1; boolean found = false; int midpoint = (first + last) / 2; while (first <= last && !found) { if (a[midpoint] == numberToFind) { found = true; } else { if (numberToFind < a[midpoint]) { last = midpoint - 1; } else { first = midpoint + 1; } } midpoint = (first + last) / 2; } if (!found) { return -1; } return midpoint; } } How each step of Linear Search reduces the problem size

100 99 98

A lot more steps…. 1 How each step of Binary Search reduces the problem size 100 50 25 12 6 3 1 clicker Given an array with 1,000,000 elements in sorted order, how many elements do you expect to look at when searching (with binary search) for a value if: item present item not present A. 1 500,000 B. 20 20 C. 1 1,000,000 D. 1,000 500,000 E. 1,000 1,000 15 https://www.youtube.com/watch?v=WaNLJf8xzC4 But, why do we sort lists? What’s the point?

To make it easier to look up stuff--to search! Who cares about sorting stuff quickly?

If .com had used Insertion Sort instead of Quicksort, it would’ve taken forever to get our search results! Amazon wouldn’t have been so successful if they had used a poor sorting algorithm!