• 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
codeunshackled Avatar
Name:Unknown
Clan:Unknown
Member Since:Sep 2016
Last Seen:Oct 2018
Profiles:
Following:2
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (9)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • anter69
    • commented on "Clay Pigeon Shooting" ruby solution
    • 7 years ago

    Although you can easily index an array with -1, 0, 1 too...

  • Custom User Avatar
    • bestwebua
    • commented on "Permutations" kata
    • 9 years ago

    I think main idea of this kata is write own method like .permutation.

  • Custom User Avatar
    • junthecoder
    • commented on "Clay Pigeon Shooting" ruby solution
    • 9 years ago

    First, <=> operator returns -1, 0, or 1.

    i.e.) scores[:P2] <=> scores[:P1] returns
    -1 if scores[:P2] < scores[:P1]
     0 if scores[:P2] == scores[:P1]
     1 if scores[:P2] > scores[:P1]

    Because array index starts from 0, adding 1 is necessary to make a correct index (0, 1, or 2).

  • Custom User Avatar
    • codeunshackled
    • commented on "Permutations" kata
    • 9 years ago

    cant use method permutation?. Works perfect when tested locally.

  • Custom User Avatar
    • codeunshackled
    • commented on "Clay Pigeon Shooting" ruby solution
    • 9 years ago

    why the + 1 at the end?

  • Custom User Avatar
    • codeunshackled
    • commented on "Sum of Pairs" ruby solution
    • 9 years ago

    I know this solution is as simple as it gets. HOWEVER, can anybody dare explaining it ?.

  • Custom User Avatar
    • g964
    • commented on "Is my friend cheating?" kata
    • 9 years ago

    You don't need matrices.

  • Custom User Avatar
    • codeunshackled
    • commented on "Is my friend cheating?" kata
    • 9 years ago

    I used Matrix class. Of course, since the test suite must have some insanely large integers, my code can't be submitted, but it works with small numbers.

  • Custom User Avatar
    • codeunshackled
    • commented on "Double Cola" kata
    • 9 years ago

    The output example is wrong. int 52 can never be "Penny", even if you count it manually the right value is "Leonard".
    Can't pass test suite but passes all tests locally. Also, some of the the int parameters might be just too large to being handled as a number. The test suite times out.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...