Ad
  • Custom User Avatar

    Well, I can open you a secret. For calcating the amount of method execution I use a subclass where I have just overriden the reverse method. How would you count the same using a static merhod? Any good idea?

  • Custom User Avatar

    The recursive function should be stateless.
    I guess you have a side effect as u use global variables.
    Try to find mode examples about recursive funcitons and how they supposed to work.

  • Custom User Avatar

    ok, let me double check it

  • Custom User Avatar

    Hi Danials,

    It means only one thing that your code is wrong. Please try to spot an error in your code.
    Unfortunately I did a mistake when put expect result instead actual and can't change it now as all tests are blocked.
    You should read it as: expected 11, but was 8.

  • Default User Avatar

    You should always spoiler your code on these discussions, since they can be viewed inadvertantly by someone who hasn't solved the kata yet.

    Your reverse method should not be static. Just use public String reverse(String str). That should get you past the compiler error.