• 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
sgerodes Avatar
Name:sgerodes
Clan:Gerodes
Skills:python, java, blockchain, data science
Member Since:Feb 2018
Last Seen:Apr 2024
Profiles:
Following:102
Followers:102
Allies:92
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations
  • Replies (37)
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • BenjaminPryke
    • commented on "Array plus array" python solution
    • 3 years ago

    It doesn't modify the arrays, but creates a new array.

  • Custom User Avatar
    • Mr.Dr.Professor
    • commented on "Highest and Lowest" java solution
    • 4 years ago

    sorted will be delegeted to Arrays.sort() here
    and Arrays.sort() is O(nlogn) which is more than
    O(4n)

  • Custom User Avatar
    • JohanWiltink
    • resolved an issue on "The Millionth Fibonacci Kata" kata
    • 5 years ago

    You can safely assume if it can be up to 2e6, it can be down to -2e6.

  • Custom User Avatar
    • hobovsky
    • commented on "Regular Expression for Binary Numbers Divisible by n" kata
    • 5 years ago

    I am not really sure if size of regex is your problem here. My java solution uses kind-of-sounding-similar approach, and my longest expression is ~117kB (sic!) for 17. A couple of other expressions are also in area of a couple of tens of kilobytes.

    My solution does not time out even though I do no particular simplification, I use capturing groups and backtracking quantifiers. It means, my expressions are TOTALLY not optimized, it;s maybe just the order of eliminated nodes what controls the size of my expressions. But in other languages, with other regex libraries, it could be necessary to optimize the expression a bit. AFAIK Python has a limit of number of capturing groups, and maybe you could use non-giving back quantifiers to reduce backtracking of the regex?

  • Custom User Avatar
    • Blind4Basics
    • commented on "Regular Expression for Binary Numbers Divisible by n" kata
    • 5 years ago
    • first check that you don't use matching groups (even if you're not using python)
    • second... I cannot really tell (cause I solved it building my reasonning from scratch), but since you mentionned this kind of concept, I'd begin by checking "reduction" algo of that kind of thing specifically.
  • Custom User Avatar
    • FArekkusu
    • resolved a question on "Did you mean ...?" kata
    • 5 years ago
  • Custom User Avatar
    • trashy_incel
    • resolved a suggestion on "All unique" kata
    • 5 years ago

    Mentioned case-sensitivity in description

  • Custom User Avatar
    • dinglemouse
    • commented on "How many Wagons Are in the Train?" java solution
    • 6 years ago

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

  • Custom User Avatar
    • gaslight
    • commented on "Did you mean ...?" kata
    • 6 years ago

    If you insert a letter, it implies that you have to delete and add a certain letter: (cost 2)
    If you simply add or delete: (cost 1)
    This is a well known approach called minimum edit distance.
    I passed all tests but the one we are talking about.

    e.g.
    rkacypviuburk to zqdrhpviqslik, cost: 16 because you have to delete and add 8 letters
    rkacypviuburk to karpscdigdvucfr, cost: 12 because you have to delete and insert 5 and also delete 2 letters

    same account to the test you are addressing!

  • Custom User Avatar
    • S_Polaczek
    • commented on "Grasshopper - Summation" python solution
    • 6 years ago

    me too. damn!

  • Custom User Avatar
    • user8436785
    • commented on "CSV representation of array" python solution
    • 6 years ago

    See https://stackoverflow.com/questions/1247486/list-comprehension-vs-map
    in this case map is best practice.

  • Custom User Avatar
    • user8071091
    • commented on "Ranking Poker Hands" kata
    • 6 years ago

    Of course C is also checking this "Low-ace straight", contradicting the instructions... edit: I mean in the sample tests, anyway. I don't get that far in real tests yet ;)

  • Custom User Avatar
    • lechevalier
    • commented on "Find Nearest Fibonacci Number" kata
    • 6 years ago

    Oh damn... I fought n was the index in Fibonacci sequence.

  • Custom User Avatar
    • ZED.CWT
    • commented on "Find Nearest Fibonacci Number" python solution
    • 6 years ago
    //   Manually  Notification   \\
    \\ Please read the post above //
    
  • Custom User Avatar
    • ZED.CWT
    • commented on "Find Nearest Fibonacci Number" python solution
    • 6 years ago

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

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...