• Custom User Avatar

    Am I missing something or is this not that optimized? Cuz assume that n = 501, the iteration will add 1500 hamming numbers when you don't need that much

  • Custom User Avatar

    apparently, diagonal touching is a thing

  • Custom User Avatar

    I don't get it, how do these boats touch? I don't understand you marked that comment as spoiler, it spoils nothing, it just clarifies the spec. And I still don't get why CW still does not allow notifications for comments marked as spoiler.

  • Custom User Avatar

    This kata needs a complete overhaul. Better input/output format, test verification and random test generator. Author has left the building and I ain't touching the current C++ and C# code. Let's retire this and make the 8x8 variation the author hinted at in the description.

  • Custom User Avatar

    i can't this very very geinus

  • Custom User Avatar

    This is the case for many tests, here's another one:

    actual:
    +---+---+---+---+---+---+---
    | ◄ | ► |   |   | ▲ |   | 3 	1(1) ◄ ■ ►
    +---+---+---+---+---+---+---	2(2) ◄ ►
    |   |   | ♦ |   | ■ |   | 2 	3(3) ♦
    +---+---+---+---+---+---+---
    |   |   |   |   | ▼ |   | 1 
    +---+---+---+---+---+---+---
    |   |   | ♦ |   |   |   | 1 
    +---+---+---+---+---+---+---
    |   |   |   |   |   |   | 0 
    +---+---+---+---+---+---+---
    |   |   | ♦ |   | ◄ | ► | 3 
    +---+---+---+---+---+---+---
    | 1 | 1 | 3 | 0 | 4 | 1 |
    expected:
    +---+---+---+---+---+---+
    | ♦ | . | ▲ | . | ▲ | . |
    +---+---+---+---+---+---+
    | . | . | ▼ | . | ■ | . |
    +---+---+---+---+---+---+
    | . | . | . | . | ▼ | . |
    +---+---+---+---+---+---+
    | . | . | ♦ | . | . | . |
    +---+---+---+---+---+---+
    | . | . | . | . | . | . |
    +---+---+---+---+---+---+
    | . | ♦ | . | . | ◄ | ► |
    +---+---+---+---+---+---+
    
  • Custom User Avatar

    Example test: multiple solutions are possible

    actual:
    +---+---+---+---+---+---+---
    |   |   |   | ◄ | ► |   | 2 	1(1) ◄ ■ ►
    +---+---+---+---+---+---+---	2(2) ◄ ►
    |   |   |   |   |   |   | 0 	3(3) ♦
    +---+---+---+---+---+---+---
    |   | ♦ |   |   |   |   | 1 
    +---+---+---+---+---+---+---
    | ▲ |   | ▲ |   | ♦ |   | 3 
    +---+---+---+---+---+---+---
    | ▼ |   | ■ |   |   |   | 2 
    +---+---+---+---+---+---+---
    |   |   | ▼ |   | ♦ |   | 2 
    +---+---+---+---+---+---+---
    | 2 | 1 | 3 | 1 | 3 | 0 |
    expected:
    +---+---+---+---+---+---+
    |   | ♦ |   | ♦ |   |   |
    +---+---+---+---+---+---+
    |   |   |   |   |   |   |
    +---+---+---+---+---+---+
    |   |   |   |   | ▲ |   |
    +---+---+---+---+---+---+
    | ▲ |   | ▲ |   | ▼ |   |
    +---+---+---+---+---+---+
    | ▼ |   | ■ |   |   |   |
    +---+---+---+---+---+---+
    |   |   | ▼ |   | ♦ |   |
    +---+---+---+---+---+---+
    
  • Custom User Avatar

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

  • Custom User Avatar

    Quite nice and funny kata to solve in fact, good job.

  • Custom User Avatar

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

  • Custom User Avatar

    I love this solution - it's certainly the most readable!

  • Custom User Avatar

    @angelplusultra
    Distinct() keeps the first instance of an element and discards the rest.

    The reason we reverse is because we want to keep the last item, not the first. A requirement from the kata description: "keeping the last ( rightmost ) occurrence of each element"

    So we reverse it, remove the duplicates, then reverse it again to get it back to the original order.

  • Custom User Avatar

    Why are you reversing the array in the first place?

  • Custom User Avatar

    Initial grid is not extensively tested; every test case is already unique by clues.

    There should be test cases with the same clue but different grids.

  • Custom User Avatar

    Random tests only consists of a small set of fixed inputs, so it is very easy to hard code against all of them.

  • Loading more items...