• Sign Up
  • Kata
  • Kumite
  • Blog
  • Forum
  • Wiki
  • Leaders
  • Log In
  • Sign Up
Name:Unknown
Clan:Unknown
Member Since:Oct 2017
Last Seen:Mar 2021
Profiles:
    Following:1
    Followers:1
    Allies:1
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (14)
    • Replies
    • Authored
    • Needs Resolution
      • Everlasting_neverness
      • commented on "Merge two sorted arrays into one" kata

      Thanks for everyone!

      • Blind4Basics
      • commented on "Merge two sorted arrays into one" kata

      yes, it's the same (but longer to do)

      • FArekkusu
      • commented on "Merge two sorted arrays into one" kata

      Yeaaaaaaaaaaah. Should have popped until empty and appended something, then it would work (I think).

      • FArekkusu
      • commented on "Merge two sorted arrays into one" kata

      As B4B said, you can safely mutate the input now. And if you do not want to, you can make a copy of the array like you said (though there's a shorter way :P).

      @B4B, I'd tried mutating the input before you fixed it but it didn't work for some reason O_o

      def f(a, b):
        a, b = [0], [1]
        return [0, 1]      # [0, 1] should equal a very long expected array
      
      • Everlasting_neverness
      • commented on "Merge two sorted arrays into one" kata

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

      • Blind4Basics
      • resolved a question on "Merge two sorted arrays into one" kata

      the test suite was sensible to input mutation. I corrected it.

      @Everlasting_neverness:

      • first, do not reinvent the wheel: this is 8 kyu, meaning it can be done in less than 30 chars or so
      • second, do never (almost... like in "unless one tells you you can" or so) mutate the input, it's very bad practice
      • Everlasting_neverness
      • commented on "Merge two sorted arrays into one" kata

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

      • FArekkusu
      • commented on "Merge two sorted arrays into one" kata

      Could you post your code with a spoiler tag?

      • Everlasting_neverness
      • commented on "Merge two sorted arrays into one" kata

      Don;t know. First tests show no mistakes, but all onSubmit tests show the exact same issue (with different integers offcourse, but with the same pattern), that is above.

      • FArekkusu
      • commented on "Merge two sorted arrays into one" kata

      Are you sure it's not your code though? Everything's fine for me.

      • Everlasting_neverness
      • created a question for "Merge two sorted arrays into one" kata

      Can anyone tell me, why '[-99, -97, -96, -95, -94, -93, -92, -91, -88, -85, -83, -82, -81, -80, -78, -77, -76, -74, -72, -70, -67, -64, -59, -58, -57, -55, -54, -52, -48, -46, -45, -42, -41, -40, -38, -37, -32, -30, -29, -28, -25, -24, -23, -18, -15, -13, -12, -10, -8, -5, -2, -1, 0, 1, 2, 5, 6, 7, 9, 11, 12, 14, 17, 18, 20, 21, 24, 25, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 39, 41, 42, 43, 44, 45, 46, 49, 50, 51, 52, 53, 54, 55, 57, 58, 61, 63, 64, 65, 66, 67, 71, 72, 74, 75, 77, 81, 83, 85, 86, 87, 88, 89, 90, 92, 93, 94, 96, 98, 100] should equal [98, 100]' and so on ???
      Is there any problem with negative integers? Because, there's nothing about it in the explanation.

      • nesusvet
      • resolved an issue on "Can I play right now?" kata

      I don't think it's an issue though

      • nesusvet
      • commented on "Can I play right now?" kata

      Unfortunately I cannot read python code without indents, so I can't help you now :(
      Please use markdown to preserve code block.

      def can_i_play(now_hour, start_hour, end_hour):
        pass
      
      • Everlasting_neverness
      • created an issue for "Can I play right now?" kata

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

    • © 2021 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Contact
    • powered by

    Confirm

    • Cancel
    • Confirm