• 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
MathBasher Avatar
Name:Hans Gabriel B. Daduya
Clan:Central Philippine University
Skills:react, flask, node.js, docker, tensorflow
Member Since:Sep 2020
Last Seen:Oct 2024
Profiles:
    Following:63
    Followers:62
    Allies:61
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations
    • Replies
    • Authored (5)
    • Needs Resolution
    • Custom User Avatar
      • MathBasher
      • commented on "Primes in numbers" python solution
      • 5 years ago

      My solution is longer than most but I think the idea is simply prime factorization.

    • Custom User Avatar
      • MathBasher
      • commented on "Coping with NP-Hardness #3: Finding the Minimum Hamiltonian Cycle" kata
      • 5 years ago

      This is just the travelling salesman problem. An NP-Hard problem with no polynomial time solution.

    • Custom User Avatar
      • MathBasher
      • commented on "Smallest unused ID" python solution
      • 5 years ago

      Probably the fastest and the simplest at the same time!

    • Custom User Avatar
      • MathBasher
      • commented on "Smallest unused ID" python solution
      • 5 years ago

      After seeing the solutions of others, I noticed that their time complexity is O(n**2). I think my solution is O(nlog(n)) since sorting an array takes that time and then a linear scan will check the result.

    • Custom User Avatar
      • MathBasher
      • commented on "Last digit of a huge number" python solution
      • 5 years ago

      Here's my brainfuck of a solution. Apparently I wanted to use the Chinese Remainder Theorem for modulo 10 thus giving us a simplified us something easier to compute such as (6a_1 + 5a_2) % 10 where a_1 is the remainder divided by 5 and a_2 is the remainder when divided by 2. The logic is kinda nuts and a lot of repetetive code. I'll improve on this next time.

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...