Ad
  • Custom User Avatar

    I looked through the existing Java solutions and there are basically two types:

    • One using only String[][] arrays, coming out with 800-1500 characters.
    • One building an FSM and converting to regex which is at 2000-3000 charactes using Maps for the FSM or 3000-5000 characters implementing own types.

    None of them is golfed. Some even have comments explaining the algorithm.

    Of course, this is due to survivorship bias, so longer solutions will exist but are not passing.

    You might want to attempt/test your solution once that I can take a look at it.

  • Custom User Avatar

    Once again, I have no good idea why you focused on the golfing part so hard. There is no need to golf anything if your idea is not totally missed in some way. I am on my phone so its not easy for me to check exact sizes of existing solutions, but id estimate the shorter ones being around 500-1000 chars, long ones (including mine) around 1500-2500 chars, WITHOUT ANY GOLFING.

    You are not asked to golf your code. Theres no need to. You are expected to come up with a good idea for your solution, which for 1 kyu kata is not unreasonable.

  • Custom User Avatar

    I would say you are doing something wrong. My solution has ~120 lines, and nice solutions have like 50 lines. There is even a C solution which is 4 lines long.

    If you cannot fit into 5k characters, it sounds you need some much better idea.