© Michael Stueben 2018
Michael StuebenGood Habits for Great Codinghttps://doi.org/10.1007/978-1-4842-3459-4_18

18. Do Not Snub Inefficient Algorithms

Michael Stueben1 
(1)
Falls Church, Virginia, USA
 

In the excellent popular mathematics book The Golden Ticket (P, NP, and the Search for the Impossible), the reader is asked to partition the 38 numbers below into two distinct sets of 19 numbers that each sum to 1,000,000.

    Lst =  [14175, 15055, 16616, 17495, 18072, 19390, 19731, 22161, 23320, 23717, 26343, 28725, 29127, 32257, 40020, 41867, 43155, 46298, 56734, 57176, 58306, 61848, 65825, 66042, 68634, 69189, 72936, 74287, 74537, 81942, 82027, 82623, 82802, 82988, 90467, 97042, 97507, 99564]

The author made the comment, “Not so easy, is it. There ...

Get Good Habits for Great Coding: Improving Programming Skills with Examples in Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.