Ad
  • Custom User Avatar

    Aaa now I understood what you mean. it wasn't stacking in the first test it was stacking in 0 :D. sorry that I have waste your time. and thank you for your help.

  • Custom User Avatar

    i was going to add if statement at the beginning of the code for that. my problem is that i cannot even run program for solving this:

    assertEquals("128.114.17.104", Kata.longToIP(2154959208L)

    So I have changed my solution to more static/brute force method to test.

  • Custom User Avatar

    Sorry I ve never shared my code before in this platform i dont know why it looks so weird

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Well thank you for your replay but when i printed out my solution it was matching with his answer. I can try to solve it again. which version of java did u use?

  • Custom User Avatar

    There is a problem with String index out of range: when u solve the problem, in Java