• 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
Holyshock Avatar
Name:Alex
Clan:Unknown
Member Since:Apr 2017
Last Seen:Jul 2024
Profiles:
Following:1
Followers:2
Allies:1
View Profile Badges
Ad
How many Kata did you complete in 2024?
Discover our top moments in 2024 and how you can level up in 2025.
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (6)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • vanitwo
    • commented on "Find the unique number" csharp solution
    • 2 years ago

    That feeling when you created a dictionary, and then two more cycle, and the guys did everything in one line =)

  • Custom User Avatar
    • IgorHoruzha
    • commented on "Find the unique number" csharp solution
    • 3 years ago

    О(n)+O(1-2)?

  • Custom User Avatar
    • keithn
    • commented on "Find the unique number" csharp solution
    • 3 years ago

    it really should have a failing test on memory allocation with some IEnumberable the generates billions of values.

  • Custom User Avatar
    • IDontKnower
    • commented on "Find the unique number" csharp solution
    • 5 years ago

    @Pankwood, @thanhdoan
    Problem here is not a O()
    Problem here is an IEnumerable in C#.
    Possible, it can be infinite.
    You can try it with simple method: https://gist.github.com/IDontKnower/5df0a1a5d957ec37f719674eafeeacf4
    I think, in my example it's realy hard to get GroupBy or Sort)

  • Custom User Avatar
    • seeker911
    • commented on "Find the unique number" csharp solution
    • 5 years ago

    More code BUT definitely more optimal than 99% of the solutions here. Optimal is the way !!

  • Custom User Avatar
    • seeker911
    • commented on "Find the unique number" csharp solution
    • 5 years ago

    Nice simple 1 liner BUT certainly not optimal.

    Most solutions here parse through the entire collection and are far from optimal. What if the collection contained a file with 10 trillion numbers and the offending number was 4th on the list or worse 1st on the list. Why parse a collection that big only to discover the offending number was 1st on the list ?

    Rather a few more lines of code.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...