• 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
swift-student Avatar
Name:Unknown
Clan:Unknown
Member Since:Apr 2020
Last Seen:Oct 2021
Profiles:
Following:1
Followers:1
Allies:1
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (7)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • swift-student
    • commented on "Primes in numbers" swift solution
    • 5 years ago

    Was testing your function and noticed that it gave me a bad access error, probably due to the recursion depth, when calculating factors(100_003). That said, I appreciate the way you thought of this recursively, very smart.

  • Custom User Avatar
    • swift-student
    • commented on "Primes in numbers" swift solution
    • 5 years ago

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

  • Custom User Avatar
    • swift-student
    • commented on "Are they the "same"?" swift solution
    • 5 years ago

    I agree with antong01. This problem is best solved in O(n) by not sorting either array, but instead making use of a dictionary. Most of the solutions submitted either use sorting which results in O(n log n) or searching through an array, which results in O(n^2) overall. While simple and concise to write, they don't scale as well.

  • Custom User Avatar
    • Chrono79
    • commented on "Jaden Casing Strings" swift solution
    • 5 years ago

    Please mark your posts as having spoiler content even in Solutions when they have spoilers.

  • Custom User Avatar
    • swift-student
    • commented on "Jaden Casing Strings" swift solution
    • 5 years ago

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

  • Custom User Avatar
    • swift-student
    • commented on "Sum of Digits / Digital Root" swift solution
    • 5 years ago

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

  • Custom User Avatar
    • swift-student
    • commented on "Roman Numerals Decoder" swift solution
    • 5 years ago

    I suppose I should have incremented i in the else clause of my guard statement, as right now given an invalid character it would infinite loop.

    guard let value = symbolValues[charArray[i]] else {
        i += 1
        continue
    }
    
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...