• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
bartolin Avatar
Name:Unknown
Clan:Unknown
Member Since:Jan 2017
Last Seen:May 2025
Profiles:
    Following:2
    Followers:5
    Allies:2
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (16)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • ritsIroneye
      • commented on "Alan Partridge II - Apple Turnover" javascript solution
      • 6 years ago

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

    • Custom User Avatar
      • bartolin
      • commented on "Dominant array elements" ruby solution
      • 7 years ago

      This is concise and nice to read, but becomes very slow for large arrays. Taking (1..1000000).to_a as an input, took nearly 5 min on my (old) machine.

    • Custom User Avatar
      • bartolin
      • commented on "extract file name" ruby solution
      • 8 years ago

      No problem at all! But thanks for the note (and for the kata :-). I've submitted a modified solution, using the new method name.

    • Custom User Avatar
      • Javatlacati
      • commented on "extract file name" ruby solution
      • 8 years ago

      Sorry for the inconveniences I've changed method name to extract_file_name your solution will not pass from now. Please let me know if you want some other convention to be applied.

    • Custom User Avatar
      • bartolin
      • commented on "Simple Fun #327: The Final Attack Value" kata
      • 8 years ago

      I'll keep that in mind, thanks a lot!

    • Custom User Avatar
      • RShields
      • commented on "Simple Fun #327: The Final Attack Value" kata
      • 8 years ago

      As a rule of thumb, never modify your inputs. Most langs have primitives that automatically "clone" but arrays are pretty much always mutable, so you should clone them before doing anything.

    • Custom User Avatar
      • bartolin
      • commented on "Simple Fun #327: The Final Attack Value" kata
      • 8 years ago

      Oh, I see. I tried a recursive solution and didn't think about keeping the input array intact. Thanks for the pointer :-)

    • Custom User Avatar
      • myjinxin2015
      • commented on "Simple Fun #327: The Final Attack Value" kata
      • 8 years ago

      Don't modify the input array ;-)

    • Custom User Avatar
      • bartolin
      • commented on "Simple Fun #327: The Final Attack Value" kata
      • 8 years ago

      I might be wrong, but it seems like the random tests (for Ruby) always expect the value of x as the return value.

      Random tests
      Testing for 12 and [712, 6636, 959, 81, 3734, 70, 1172, 33, 6, 561, 237, 749, 27, 74, 1, 7370, 8, 7335, 53, 5323]
      It should work for random inputs too - Expected: 12, instead got: 143

    • Custom User Avatar
      • mikestepanov
      • commented on "Simple Fun #223: Parameter Of Number" kata
      • 8 years ago

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

    • Custom User Avatar
      • GiacomoSorbi
      • commented on "Simple Fun #223: Parameter Of Number" kata
      • 8 years ago

      No worries, thank you for your feed (I didn't think people could name a support function like me, but it was indeed pretty likely).

      @myjinxin2015, we were editing the file in the same instant, I changed different things, apparentely; sorry for the inconvenience^^'

    • Custom User Avatar
      • bartolin
      • commented on "Simple Fun #223: Parameter Of Number" kata
      • 8 years ago

      Yes, was talking about Ruby. Sorry for not mentioning the language.

      Works like a charm now. Thanks for the quick fix!

    • Custom User Avatar
      • myjinxin2015
      • commented on "Simple Fun #223: Parameter Of Number" kata
      • 8 years ago

      It should be fixed.
      Please re-test.
      Thans for you feedback ;-)

    • Custom User Avatar
      • GiacomoSorbi
      • commented on "Simple Fun #223: Parameter Of Number" kata
      • 8 years ago

      I would assume it was for a naming collision: try now that I refactored, cheers :)

    • Custom User Avatar
      • myjinxin2015
      • commented on "Simple Fun #223: Parameter Of Number" kata
      • 8 years ago

      In Ruby?

    • Loading more items...
    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...