• 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
Ryanman Avatar
Name:Ryan McElroy
Clan:Hylaine
Member Since:Nov 2017
Last Seen:Dec 2024
Profiles:
Following:35
Followers:37
Allies:35
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (17)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Ryanman
    • commented on "Sudoku Solution Validator" csharp solution
    • 3 years ago

    This is the exact concept I tried to capture in my solution with (what I think is) more readable but probably way less performant. Awesome solution man!

  • Custom User Avatar
    • Ryanman
    • commented on "Sum over a database" kata
    • 3 years ago

    I'll just say this: I have the building blocks for how this should work. I've accomplished it within 15 minutes in SQL Server and translated most of the syntax over to Postgres.

    I have to admit that the way tests are set up for this Kata are profoundly unfriendly compared to other SQL Kata. Getting into the nitty gritty of what we can do vs what we can't in Codewars is difficult.

  • Custom User Avatar
    • Ryanman
    • commented on "Path Finder #1: can you reach the exit?" kata
    • 4 years ago

    All of the test cases are NxN, at least in C#. Maybe the cases have changed since you commented, but for anyone else looking at discourse you shouldn't consider jagged or rectangular arrays.

  • Custom User Avatar
    • Ryanman
    • commented on "Path Finder #1: can you reach the exit?" kata
    • 4 years ago

    You can use the console temporarily to see what cases are being run, but there is a performance impact you should be aware of when submitting.

  • Custom User Avatar
    • Ryanman
    • commented on "Path Finder #1: can you reach the exit?" kata
    • 4 years ago

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

  • Custom User Avatar
    • Jomopipi
    • commented on "Solving a puzzle by matching four corners" kata
    • 5 years ago

    .

  • Custom User Avatar
    • tonylicoding
    • commented on "Solving a puzzle by matching four corners" kata
    • 5 years ago

    If n is the number of pieces, yes as i was talking about like two nested for loops, it is either O(n) or O(n * m) where n, m is height and length.

    I also don't believe any solutions are O(n^2) if n is the number of pieces. By doing a simple nested loop with for p in pieces: twice, it times out.

  • Custom User Avatar
    • dlcoe
    • commented on "Solving a puzzle by matching four corners" csharp solution
    • 5 years ago

    Your solution is much easier to understand! Months later, this is true for me, even though I wrote my code...

  • Custom User Avatar
    • Ryanman
    • commented on "RoboScript #1 - Implement Syntax Highlighting" csharp solution
    • 5 years ago

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

  • Custom User Avatar
    • Blind4Basics
    • commented on "Solving a puzzle by matching four corners" kata
    • 5 years ago

    first things first: what is n exactly?

    @tony:

    here, n being the number of pieces, the best solution is O(n) (for the precise reasons Ryanman is explaning)

  • Custom User Avatar
    • Ryanman
    • commented on "Solving a puzzle by matching four corners" kata
    • 5 years ago

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

  • Custom User Avatar
    • tonylicoding
    • commented on "Solving a puzzle by matching four corners" kata
    • 5 years ago

    I think O(n^2) is the lowest possible time as you need to have a nested loop. Take your solution for example, it has a nested loop, so its O(n^2).

  • Custom User Avatar
    • Ryanman
    • commented on "Solving a puzzle by matching four corners" kata
    • 5 years ago

    This was a great Kata. Similar to other solver feedback, named Tuples would have been a nice to have (but I think your approach seems very common on code wars). Another minor point of feedback is that I totally missed for an attempt or two the fact that puzzles can be rectangular. In hindsight, it's very obvious, since you have width and height variables, but with the square example I got a bit lost in the sauce. Finally, a very very minor grammatical point: In notes, I would change "Be careful about performances" to "Be careful about performance".

    A lot of the solutions I've seen were huge and/or O(n2), I believe this is solvable in O(n).

    Thanks for your work!

  • Custom User Avatar
    • Ryanman
    • commented on "Solving a puzzle by matching four corners" csharp solution
    • 5 years ago

    Love how succinct this code is.

  • Custom User Avatar
    • Ryanman
    • commented on "Dealing With Messy Data" sql solution
    • 5 years ago

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

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...