Timeline for Is the number binary-heavy?
Current License: CC BY-SA 3.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 14, 2017 at 13:54 | comment | added | Rod | @FryAmTheEggman this is also true on the old answer, where the cmp returns 0 when they are both equals | |
| Jul 14, 2017 at 12:47 | comment | added | FryAmTheEggman | @shadow There is no problem, because of the way max works. In the event of a tie, max will return the first value in the iterable that has the maximal value. This code uses that fact to make sure that 1 is returned in the event of a tie, which actually means there are more ones than zeros, since an extra zero was added by bin. It would actually be incorrect when written this way if not for the extra zero. | |
| Jul 14, 2017 at 3:29 | comment | added | Shadow | Does the leading 0 in the return of bin cause this solution problems? | |
| S Jul 13, 2017 at 17:44 | history | edited | Rod | CC BY-SA 3.0 | deleted 19 characters in body |
| Jul 13, 2017 at 17:38 | review | Suggested edits | |||
| S Jul 13, 2017 at 17:44 | |||||
| Jul 13, 2017 at 17:33 | history | edited | Rod | CC BY-SA 3.0 | added 382 characters in body |
| Jul 13, 2017 at 14:53 | history | edited | Rod | CC BY-SA 3.0 | added 53 characters in body |
| Jul 13, 2017 at 14:42 | history | answered | Rod | CC BY-SA 3.0 |