• 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
tommur Avatar
Name:Unknown
Clan:Object AI
Member Since:Feb 2018
Last Seen:Jul 2025
Profiles:
    Following:1
    Followers:10
    Allies:1
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (70)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • CClairvoyant
      • commented on "Flatten and sort an array" python solution
      • 17 days ago

      Maybe you mistyped it like you did just now.

    • Custom User Avatar
      • tommur
      • commented on "Battleship field validator" python solution
      • 29 days ago

      Think you're right @fenring76 – I can't speak to what I was thinking four months ago, but that does appear to be what paraliterary was saying.
      In any case, the code outputs False for this input which is the expected result (because of the aforementioned L shaped vessel), so perhaps paraliterary was testing a different input to the one provided.
      Sorry @paraliterary for (presumably) misunderstanding what you said, I hope you got to the bottom of the situation.

    • Custom User Avatar
      • fenring76
      • commented on "Battleship field validator" python solution
      • 29 days ago

      Isn't @paraliterary's point that the field is invalid but your solution returns True indicating that it is valid?

    • Custom User Avatar
      • tommur
      • commented on "Battleship field validator" python solution
      • 5 months ago

      The solution is correct, your input is invalid - you've provided an (invalid) L shaped vessel in the top left.

    • Custom User Avatar
      • SuperShot3
      • commented on "Flatten and sort an array" python solution
      • 5 months ago

      Goode one just learn it =)

    • Custom User Avatar
      • Misutā Robotto
      • commented on "Flatten and sort an array" python solution
      • 11 months ago

      I tried to use intertools in former katas and it seems it's not integred in Codewars and there's no console to install it, heh.

    • Custom User Avatar
      • k3nz032
      • commented on "Battleship field validator" python solution
      • 12 months ago

      omg wtf

    • Custom User Avatar
      • paraliterary
      • commented on "Battleship field validator" python solution
      • 12 months ago

      This solution returns true when false is due for:

      snattleField = [

      [1, 0, 0, 0, 0, 1, 1, 0, 0, 0],

      [1, 0, 0, 0, 0, 0, 0, 0, 1, 0],

      [1, 1, 0, 0, 1, 1, 1, 0, 1, 0],

      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],

      [0, 0, 0, 0, 0, 0, 0, 0, 1, 0],

      [0, 0, 0, 0, 1, 1, 1, 0, 0, 0],

      [0, 0, 0, 0, 0, 0, 0, 0, 1, 0],

      [0, 1, 0, 1, 0, 0, 0, 0, 0, 0],

      [0, 1, 0, 0, 0, 0, 0, 1, 0, 0],

      [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]

      Elegant but not correct!
      Can I share a screengrab from my G Colaboratory to confirm this?

    • Custom User Avatar
      • poop123
      • commented on "Battleship field validator" python solution
      • 14 months ago

      That is actually just- 6 lines???? HOWWWWW

    • Custom User Avatar
      • FloppyFish404
      • commented on "Battleship field validator" python solution
      • 2 years ago

      WHAT, 6 LINES?!

    • Custom User Avatar
      • eisterman
      • commented on "Battleship field validator" python solution
      • 2 years ago

      "Everything you want, it's already there in a library somewhere"

      And this is the exact representation of it.

    • Custom User Avatar
      • tommur
      • commented on "Find the odd int" python solution
      • 2 years ago

      It's no bad thing to import modules if they get the job done! There's a time and a place for code golf. That said - with the distance of several years' hindsight - I should probably have added a short comment.

    • Custom User Avatar
      • chadfurman
      • commented on "Find the odd int" python solution
      • 2 years ago

      Really nice! I saw someone else use a for-loop with an xor operator (i.e. "^") which is similar and doesn't need an import. I like this the best because it is O(n) and it is very clean. It's a bit more arcane than the simplest solution, but for large values of N this is definitely the right approach.

      Good work :)

    • Custom User Avatar
      • SciGeek
      • commented on "Battleship field validator" python solution
      • 2 years ago

      The code you have written is exceptionally elegant

    • Custom User Avatar
      • pokryshkin
      • commented on "Battleship field validator" python solution
      • 2 years ago

      I found it. Thanx

    • Loading more items...
    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...