• 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
sbower Avatar
Name:Shawn Bower
Clan:Cornell University
Member Since:Dec 2015
Last Seen:Oct 2021
Profiles:
Following:201
Followers:197
Allies:196
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (24)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • cthutq58
    • commented on "Next bigger number with the same digits" javascript solution
    • 2 years ago

    Look at my faster solution without explicit sort. )))

  • Custom User Avatar
    • SergeyIsakhanyan
    • commented on "Next bigger number with the same digits" javascript solution
    • 2 years ago

    The overall time complexity of this solution is O(N!⋅NlogN).

  • Custom User Avatar
    • e4elhaam
    • commented on "Next bigger number with the same digits" javascript solution
    • 2 years ago

    Brute force should've been stated in the description of the code, but it does encourage people to write more efficent code.

    I initally decided to generate all of the permutations and then give back the next biggest one but tests stopped me from doing that.

  • Custom User Avatar
    • e4elhaam
    • commented on "Next bigger number with the same digits" javascript solution
    • 2 years ago

    Not the most efficent one but probably the cleanest.
    Although some comments would've helped

  • Custom User Avatar
    • Cien-Yuriy
    • commented on "Next bigger number with the same digits" javascript solution
    • 3 years ago

    Not smart, but, hey-y, it works.

  • Custom User Avatar
    • r.fedorov
    • commented on "Calculator" ruby solution
    • 4 years ago

    This calculator does not support expressions like "1 * (1 + 1)", as stated in the task description:
    "Create a simple calculator that given a string of operators (), +, -, *, / and numbers separated by spaces returns the value of that expression"

  • Custom User Avatar
    • dejavu2021
    • commented on "Next bigger number with the same digits" javascript solution
    • 4 years ago

    n = 199999

    approximate number of operations 720000

  • Custom User Avatar
    • Samuel Rodríguez
    • commented on "Next bigger number with the same digits" javascript solution
    • 4 years ago

    I tried this solution trying to solve a similar kata ("Next smaller number with the same digits") and timed out

  • Custom User Avatar
    • dm1981
    • commented on "Next bigger number with the same digits" javascript solution
    • 5 years ago

    I went with a more tiny solution but I'mnot fully happy with it. It seems that this Kata wasn't very easy to anyone

  • Custom User Avatar
    • der-HANS
    • commented on "Calculator" ruby solution
    • 5 years ago

    this solution is not correct,
    it is just fitting for tests,
    it does not work for the example from the condition
    Test.assert_equals(calc.evaluate("2 / 2 + 3 * 4 – 6"), 7)

  • Custom User Avatar
    • godscode
    • commented on "Next bigger number with the same digits" javascript solution
    • 5 years ago

    Please see my solution to the problem. I think it works for such large numbers.

  • Custom User Avatar
    • rwood112
    • commented on "Calculator" ruby solution
    • 6 years ago

    not converting the numbers to floats before applying the operator?

  • Custom User Avatar
    • buy instagram followers
    • commented on "Next bigger number with the same digits" javascript solution
    • 6 years ago

    somehow brute force but nice solution

  • Custom User Avatar
    • hksong
    • commented on "Next bigger number with the same digits" javascript solution
    • 7 years ago

    For anyone who has a problem with this solution, you should blame the test cases, not the solution.

    If the author wanted to rule out brute force solutions, they could have included larger numbers for the test cases.

  • Custom User Avatar
    • gaoqi7
    • commented on "Calculator" ruby solution
    • 8 years ago

    The idea is amazing, I love it very much. but the code itself is a little weak. For example :("-3 - 1 * 2 + 2 - 7") have different result with ("-3 -1 * 2 + 2 - 7"). one purpose, two result.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...