• 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
ProgramFOX Avatar
Name:Unknown
Clan:Stack Exchange
Skills:c#, python, javascript
Member Since:Apr 2015
Last Seen:Dec 2018
Profiles:
Following:24
Followers:27
Allies:24
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (86)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Noha1981
    • commented on "N-th Fibonacci" csharp solution
    • 22 days ago

    Like the others have said before, is the solution good mathematical work. But in programming bad practice. For small n you can use it, but for greater n it would screem for a stack overflow.
    The reason is that you call in each return the function nthfib for two times, which will be saved in the memory till you reach 1. At this point it bubbles back and return the addition from the retun statements.
    This mess up the memory and crash your system.

    An other solution, like mine, is the linear one where you loop up. With the use of one temporary int I can calculate the n-th fibonacci. The memory it´s also constant, in the inner loop you use constantly three int with each 4 Byte = 12 Byte. This isn´t much.

  • Custom User Avatar
    • Mplusabiodun
    • commented on "Opposites Attract" javascript solution
    • 5 months ago

    This is a clever solution

  • Custom User Avatar
    • BriannaD23
    • commented on "Opposites Attract" javascript solution
    • 8 months ago

    wow this is much simpler

  • Custom User Avatar
    • 7BlackIce_
    • commented on "Opposites Attract" javascript solution
    • 8 months ago

    well that make sence.............

  • Custom User Avatar
    • stgermanrobert
    • commented on "Opposites Attract" javascript solution
    • 9 months ago

    Why am I so stupiddddd

  • Custom User Avatar
    • rsschool_95df7adb8d3cd159
    • commented on "Opposites Attract" javascript solution
    • 13 months ago

    не ну круто!

  • Custom User Avatar
    • jsspen
    • commented on "Opposites Attract" javascript solution
    • 13 months ago

    Oh I definitely should have thought of this! Very clever.

  • Custom User Avatar
    • Pieshkov
    • commented on "Opposites Attract" javascript solution
    • 15 months ago

    I like it!

  • Custom User Avatar
    • emailjohnthomascaballero
    • commented on "Opposites Attract" javascript solution
    • 16 months ago

    great!

  • Custom User Avatar
    • shamml
    • commented on "Opposites Attract" javascript solution
    • 17 months ago

    best

  • Custom User Avatar
    • DesuZaGeru2
    • commented on "Opposites Attract" javascript solution
    • 2 years ago

    Awesome, I was wondering how to do it in one line.. here's how xD

  • Custom User Avatar
    • lucasmpowell
    • commented on "Opposites Attract" javascript solution
    • 2 years ago

    Great way to simplify the logic down to just what's needed

  • Custom User Avatar
    • BevzDm
    • commented on "Opposites Attract" javascript solution
    • 2 years ago

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

  • Custom User Avatar
    • BevzDm
    • commented on "Opposites Attract" javascript solution
    • 2 years ago

    Clever

  • Custom User Avatar
    • texasdev1
    • commented on "Opposites Attract" javascript solution
    • 2 years ago

    Wish I would have thought of this. Great logic.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...