• 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
pinealan Avatar
Name:Alan Chan
Clan:University of Oxford
Skills:data science, product engineering
Member Since:Sep 2017
Last Seen:Mar 2024
Profiles:
Following:577
Followers:577
Allies:576
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (20)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • 4eckah78
    • commented on "Find the unknown digit" python solution
    • 9 months ago

    Wow!

  • Custom User Avatar
    • LucianoGR
    • commented on "Find the unknown digit" python solution
    • 2 years ago

    When I see this quality of code and compare it to my solution with 8 "ifs" I feel like shit!

  • Custom User Avatar
    • noweare
    • commented on "Find the unknown digit" python solution
    • 3 years ago

    Very clever with the regex to discard any edge cases. I used 4 if statements if 0 was being evaluated. Sheesh
    I got a long way to go.

  • Custom User Avatar
    • thetabor
    • commented on "Find the unknown digit" python solution
    • 4 years ago

    Haha was just dropping in to leave this comment.

  • Custom User Avatar
    • PDrich101
    • commented on "Powers of i" javascript solution
    • 4 years ago

    Good one :)

  • Custom User Avatar
    • Ilya758
    • commented on "Powers of i" javascript solution
    • 4 years ago

    Very simple and clear. Tnku;)

  • Custom User Avatar
    • MatiPl01
    • commented on "Find the unknown digit" python solution
    • 5 years ago

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

  • Custom User Avatar
    • Ciprian Amza
    • commented on "Find the unknown digit" python solution
    • 5 years ago

    Wow! Great solution. Everything looks so simple. :D

  • Custom User Avatar
    • tchar
    • commented on "Find the unknown digit" python solution
    • 5 years ago

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

  • Custom User Avatar
    • erg0dic
    • commented on "Find the unknown digit" python solution
    • 5 years ago

    nevermind, I just scrolled down and saw somebody submitted this already. It was fun to learn about regex to come up with this on my own though.

  • Custom User Avatar
    • erg0dic
    • commented on "Find the unknown digit" python solution
    • 5 years ago

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

  • Custom User Avatar
    • pinealan
    • commented on "One Line Task: Circle Intersection" kata
    • 7 years ago

    .

  • Custom User Avatar
    • anter69
    • resolved a suggestion on "Simple arithmetic progression" kata
    • 7 years ago

    Fixed

  • Custom User Avatar
    • Blind4Basics
    • commented on "Huffman Encoding" kata
    • 8 years ago

    I read again the description: I think that you should put emphasis on this point:

    Usually we choose 0 for the left branch and 1 for the right branch", but it is not the only way to achieve the encoding".
    
  • Custom User Avatar
    • lechevalier
    • commented on "Huffman Encoding" kata
    • 8 years ago

    @muesli4 you are right when saying engineers have to write tests themselves when facing new tasks to solve.
    But you must understand that CW purpose is to teach new concepts: a kata must guide players in order to solve it and this is done by giving explicit examples.
    Current tests are just cryptic and bring nothing at all to help warriors.
    Moreover they are misleading. Huffman encoding is a compression algorithm: its purpose is to compress a text.
    What can a player understand by reading test.assert_equals( len(encode( fs, "aaaabcc" )), 10 )? Output of this function is longer than the original string! Completely counter-intuitive...

    Please provide explicit test cases: even if it is possible to generate several outputs, it is possible to check if it belongs to a set and to provide this set in examples.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...