Timeline for Codilty, binary gap get the highest gap
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 16, 2016 at 15:09 | comment | added | Gujarat Santana | ooh okay, I see, that's amazing thing suggestion. I can reduce the memory usage for the variable and would be easier to debug | |
| Dec 16, 2016 at 0:23 | comment | added | Ted | You want to represent a binary number digit by digit. Rather than storing it as e.g. []byte("10011"), you can store it as []bool{true, false, false, true, true}. This way, you give the compiler the option of using only 1 bit by cell rather than 8 =) And you avoid making assumptions on your data: for example, if you store a binary number in a []byte, what if you have a bug and one of your cell ends up containing a different byte than '0' or '1'? This will be hard to track and debug. | |
| Dec 15, 2016 at 13:27 | comment | added | Gujarat Santana | but one thing that I still don't get it what do you mean by use []bool and name isOne ? | |
| Dec 15, 2016 at 13:26 | comment | added | Gujarat Santana | I really like when you mention about stringArray, and the testObjects | |
| Dec 15, 2016 at 13:24 | vote | accept | Gujarat Santana | ||
| Dec 14, 2016 at 8:50 | history | answered | Ted | CC BY-SA 3.0 |