• 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
patryk-tech Avatar
Name:Patryk
Clan:Unknown
Member Since:May 2020
Last Seen:Oct 2020
Profiles:
Following:1
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (6)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • 7MinutesDead
    • commented on "Delete occurrences of an element if it occurs more than n times" python solution
    • 5 years ago

    Damn I see. I thought my solution was really bad compared to this one, but I didn't consider performance as things scale up.

  • Custom User Avatar
    • Abhinandan1996
    • commented on "Delete occurrences of an element if it occurs more than n times" python solution
    • 5 years ago

    Agreed, it has O(n^2) complexity but can be done in O(n)

  • Custom User Avatar
    • Mbone
    • commented on "Delete occurrences of an element if it occurs more than n times" python solution
    • 5 years ago

    I completely agree with you. Unfortunately, when it comes to python, "best practice" seems to be shortest answer regardless of optimisation. Keep flagging these.

  • Custom User Avatar
    • patryk-tech
    • commented on "longest_palindrome" kata
    • 5 years ago

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

  • Custom User Avatar
    • patryk-tech
    • commented on "longest_palindrome" kata
    • 5 years ago

    I kept getting timeout and I even tested using the best solution and the error persists.

    What is the Big-O notation of your solution? As long as you do it in O(n) or O(n**2), it should pass the tests.

  • Custom User Avatar
    • patryk-tech
    • commented on "Delete occurrences of an element if it occurs more than n times" python solution
    • 5 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...