TinyChan

New reply in topic: Would you turn back time if you could

You are not recognized as the original poster of this topic.

:

You are required to fill in a captcha for your first 5 posts. Sorry, but this is required to stop people from posting while drunk. Please be responsible and don't drink and post!
If you receive this often, consider not clearing your cookies.

Please familiarise yourself with the rules and markup syntax before posting.


Replying to Anonymous M…

@651,863

Precisely ! When I clicked on the link, the following shit-code appear on my screen below & it was so much fun! 😀

class Solution 

{

public int numSteps(String s)

{

int steps = 0;

int carry = 0;

for (int i = s.length() -1; i > 0; i--)

{

if (s.charAt(i) - '0' + carry == 1)

{

carry = 1;

steps++;

}

steps++;

}

return steps + carry;

}


}


Anyway, I have seem a lot of shit-coding on the board nowadays!