Skip to main content

Timeline for Create a percent sign

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Aug 12, 2017 at 3:37 comment added Jakob You should use the byte count of the full 2D-representation solution. The array returned by the shorter solution would at least need to include some sort of delimiter to be valid.
Aug 1, 2017 at 15:36 comment added Kamil Drakari @TheLethalCoder Replacing the two instances of w*w with a single character variable saves 4 bytes, moving int i=0 outside the loop requires a semicolon which costs 1 byte, and then adding ,s=w*w to the declaration costs 6 bytes, so it actually nets +3 bytes.
Aug 1, 2017 at 15:25 comment added TheLethalCoder For the first, would setting w*w to a variable and moving the int declaration out of the loop save you anything?
Aug 1, 2017 at 15:24 comment added TheLethalCoder For the second using a ternary as in ?1:0 works and I believe an array of the result should be fine. The collections using also isn't necessary for that code.
Aug 1, 2017 at 15:21 history answered Kamil Drakari CC BY-SA 3.0