• 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
cucubau3000 Avatar
Name:Unknown
Clan:Unknown
Skills:python, javascript
Member Since:Mar 2016
Last Seen:Sep 2018
Profiles:
    Following:1
    Followers:1
    Allies:1
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (73)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • ejini战神
      • resolved a question on "Needles in a haystack" kata
      • 15 months ago

      You are storing the results in global scope, so any preceding function calls will cause the previously unnecessary values to accumulate.

    • Custom User Avatar
      • wodefo3512
      • commented on "Memoized Fibonacci" python solution
      • 3 years ago

      Making the cache private is a bizzare "extra challenge". I can't see how that provides any better functionality/encapsulation, if anything it just makes it harder to understand.

    • Custom User Avatar
      • micadam
      • commented on "Memoized Fibonacci" python solution
      • 3 years ago

      The calls to fibonacci(n-1) and fibonacci(n-2) will store the value in memo, no reason to do this multiple times.

    • Custom User Avatar
      • vench
      • commented on "Memoized Fibonacci" python solution
      • 5 years ago

      n is either fib(n-1) and fib(n-2)

    • Custom User Avatar
      • felipec129
      • commented on "Memoized Fibonacci" python solution
      • 5 years ago

      In this solution, only fibonacci(n) is stored in the memo. But since fibonacci(n - 1) and fibonacci(n - 2) are called, they can also be stored in the memo, so if the next test is fibonacci(n - 2) for example, the result will already be in the memo.

    • Custom User Avatar
      • Blind4Basics
      • commented on "Memoized Fibonacci" python solution
      • 5 years ago

      which is exactly what is done here... Or are you talking about the base cases?

    • Custom User Avatar
      • felipec129
      • commented on "Memoized Fibonacci" python solution
      • 5 years ago

      You should store the fibonacci(n - 1) in memo[n - 1] and the fibonacci(n - 2) in memo[n - 2]...

    • Custom User Avatar
      • Jesse17072000
      • commented on "Equal Sides Of An Array" javascript solution
      • 5 years ago

      lol i tried this and didnt work

    • Custom User Avatar
      • milan090
      • commented on "Equal Sides Of An Array" javascript solution
      • 5 years ago

      it does more than twice. 2n times

    • Custom User Avatar
      • milan090
      • commented on "Equal Sides Of An Array" javascript solution
      • 5 years ago

      Nice :| Check my code. I use reduce once and a single loop without much variables

    • Custom User Avatar
      • giggazz3
      • commented on "Equal Sides Of An Array" javascript solution
      • 5 years ago

      i believe performance is always the main concern; it isnt about looking cool and getting it in one line; that is clever yes but not best practice; best practice means most efficient and clear and scalable (which means if you want to add or remove a aspect of the code you dont have to rework on all aspects of the code only the aspect you want to) ALWAYS!!!!

    • Custom User Avatar
      • schoenb
      • commented on "Equal Sides Of An Array" javascript solution
      • 5 years ago

      This solution doesn't even pass all the tests.

    • Custom User Avatar
      • rochan
      • commented on "Equal Sides Of An Array" javascript solution
      • 5 years ago

      it does not work with [5,0,0,0,0], [0,0,0,0,5] and [20,10,-80,10,10,15,35]
      your result -1 -1 -1
      should beat the result 0 4 0

      because

      Last one:
      You are given the array {20,10,-80,10,10,15,35}
      At index 0 the left side is {}
      The right side is {10,-80,10,10,15,35}
      They both are equal to 0 when added. (Empty arrays are equal to 0 in this problem)
      Index 0 is the place where the left side and right side are equal.

    • Custom User Avatar
      • JMainol
      • commented on "Equal Sides Of An Array" javascript solution
      • 5 years ago

      What this simbol means matte?
      O(n^2)

    • Custom User Avatar
      • troab
      • commented on "Equal Sides Of An Array" javascript solution
      • 5 years ago

      I was wondering about this.. the problem describes this corner case but doesnt test for it when you submit? This code doesnt appear to handle that case.

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...