• 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
cmpcmp Avatar
Name:Unknown
Clan:Medallia
Member Since:Feb 2018
Last Seen:Jul 2021
Profiles:
    Following:3
    Followers:3
    Allies:3
    View Profile Badges
    Ad
    How many Kata did you complete in 2024?
    Discover our top moments in 2024 and how you can level up in 2025.
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations
    • Replies
    • Authored (10)
    • Needs Resolution
    • Custom User Avatar
      • cmpcmp
      • commented on "Is he gonna survive?" python solution
      • 4 years ago

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

    • Custom User Avatar
      • cmpcmp
      • commented on "Matching And Substituting" java solution
      • 6 years ago

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

    • Custom User Avatar
      • cmpcmp
      • commented on "Emotional Sort ( ︶︿︶)" python solution
      • 8 years ago

      Agreed. For what it's worth, my solution worked fine well past n = 100000 k = 5.

    • Custom User Avatar
      • cmpcmp
      • commented on "Emotional Sort ( ︶︿︶)" python solution
      • 8 years ago

      Legitimate question. Doing this for the key instead:
      key='T_T :( :| :) :D'.split().index

      This still isn't quadratic time because the number of emotions can't grow. It's slower, but just by n times the difference in comparison time?

    • Custom User Avatar
      • cmpcmp
      • commented on "Emotional Sort ( ︶︿︶)" python solution
      • 8 years ago

      2 lines? Are you losing your touch?

    • Custom User Avatar
      • cmpcmp
      • commented on "lechevalier's Python solution for "Ranking Poker Hands"" kumite
      • 8 years ago

      My bad, this is the one that accounts for the 2 pair cases and such.

    • Custom User Avatar
      • cmpcmp
      • commented on "lechevalier's fork of lechevalier's Python solution for "Ranking Poker Hands"" kumite
      • 8 years ago

      What cha think?

    • Custom User Avatar
      • cmpcmp
      • commented on "Ranking Poker Hands" python solution
      • 8 years ago

      I understand the scoring function, it was just unclear if there was any intention to account for special cases in hands like 2 Pair where the count of the value is important.

      The addition you made to sort on count --> value before comparing looks like the right solution. :)

    • Custom User Avatar
      • cmpcmp
      • commented on "Ranking Poker Hands" python solution
      • 8 years ago

      It also fails on 2 pair cases like this one: "AC AS 2H 2C KH", "AD AH 2D 3S 3C"
      There's no logic to account for the Aces + 2s losing to Aces + 3s.

      This answer just games the tests hard, pure and simple.

    • Custom User Avatar
      • cmpcmp
      • commented on "Ranking Poker Hands" python solution
      • 8 years ago

      This answer should not be valid because it doesn't account for Ace low straights (Ace, 2, 3, 4, 5). There are only 38 unique possible hands in the "random" tests, which never actually include Ace low straights.
      Example failure case: "AD 2H 3H 4H 5H", "KD KS TS QS JS"

      I am also highly suspicious of that score function...

    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...