• 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
mcropper Avatar
Name:Unknown
Clan:Unknown
Member Since:Jul 2020
Last Seen:Mar 2025
Profiles:
Following:0
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (10)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Dtlma0621
    • commented on "You're a square!" cpp solution
    • 3 months ago

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

  • Custom User Avatar
    • Chris_Rands
    • commented on "Shortest Word" python solution
    • 2 years ago

    If this kind of optimization is a bottle neck for you, then you shouln't be using Python anyway over something like C

  • Custom User Avatar
    • mcropper
    • commented on "Reverse words" cpp solution
    • 2 years ago

    Fantastic. I was trying to create this simple O(n) O(n) solution. Only when you see it do you realise how simple it is. Kicking myself, as I was almost there twice but deleted and went down other avenues.
    Great work.

  • Custom User Avatar
    • akar-0
    • commented on "Shortest Word" python solution
    • 2 years ago

    Yes, theoretically. Your solution is the best one (and very cheap for memory). Now, practically, using loops with conditional branches is something slow in general, and builtin functions like split and min are optimized in Python, so the benefice if probably not relevant for the inputs that are tested here. It would be interesting to benchmark this.

  • Custom User Avatar
    • mcropper
    • commented on "Shortest Word" python solution
    • 2 years ago

    Doesnt this solution conduct two passes? - one for splitting, and one for finding the min? So for larger strings this would be less efficient than a single for loop.

  • Custom User Avatar
    • mcropper
    • commented on "How good are you really?" cpp solution
    • 2 years ago

    its a c++17 feature, so is more efficient. eg for larger vector sizes. It can run both accumulation and reduction in parrallel meaning its optimized for multicore systems. Although for this eg the differences are miniscule.

  • Custom User Avatar
    • mcropper
    • commented on "Counting Duplicates" python solution
    • 2 years ago

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

  • Custom User Avatar
    • mcropper
    • commented on "You're a square!" cpp solution
    • 2 years ago

    agree.

  • Custom User Avatar
    • mcropper
    • commented on "You're a square!" cpp solution
    • 2 years ago

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

  • Custom User Avatar
    • mcropper
    • commented on "Calculate average " cpp solution
    • 2 years ago

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

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...