5 kyu

Crossword Puzzle! (2x2)

130 of 277rowcased
Description
Loading description...
Puzzles
Algorithms
  • Please sign in or sign up to leave a comment.
  • ahmet_popaj Avatar

    Pretty tricky kata to figure out.

  • Owltooth Avatar

    All good except my code on this one. I've gone a bit insane solving this.

  • trashy_incel Avatar

    puzzle should be const char *const [2] in C, since the user is not supposed to modify it

  • aptlyundecided Avatar

    This comment has been hidden.

  • neoquijo Avatar

    working more than 6h trying to resolve this kata, and im realy enjoyed this but i dont think i can take it for longer)

    why at the 1st test the expected result is bothside [AG UG] [UG AG] and the 3th is failing with the mirrored results?

  • Ciprian Amza Avatar

    For Java, the first random test seems broken (if I understand the task correctly). For this puzzle: puzzle = Q# __, I get this error: Invalid solution ==> expected: <{"QI", "IF", 16}> but was: <{"IF", "QI", 16}>.

  • Ciprian Amza Avatar

    Nice kata!

  • JiPiBi Avatar

    Hi To understand an error in one of the attempt tests , I added a print and attempted again and the tests became all good. A new attempt permitted me to understand were my issue was, so it seems that the tests can't cover all the edge cases (for me, letter and hashtag in diagonal and a letter that is not at the same time the beginning and the end of two words) But remains a very interesting kata :)

  • RealKenshiro Avatar

    The description is clear and the kata itself is funny and original. Thanks!

  • Harleigh Avatar

    This was a tremendously fun kata to solve; my thanks to the author and contributors. Additionally: Major props for such a well documented Details section on this kata!

  • Blind4Basics Avatar

    btw, you should add a sample tests where the letter and the # are on the same row.

  • Blind4Basics Avatar

    Pretty interesting one. But the approved rank is clearly more appropriate than the author's suggestion... ;p

    The task is to return all valid solutions for a given puzzle sorted from highest to lowest score. A puzzle solution has 3 elements: an across word, a down word, and a score. The words must be distinct and fit the given puzzle grid. The score is the sum of all letters in both words, so the shared letter is counted twice. Solutions having the same score should be sorted alphabetically by the across word first.

    In the output part, you should put all the ordering requirement in the same sentence.

    cheers

  • user9644768 Avatar

    Approved.

  • Blind4Basics Avatar

    Hi,

    There are some info that aren't very clear in the description (and since I know I almost always go way too far with your kata, I bet there are unworded restrictions in there too x) ). So...:

    • always one #?
    • the info that the words have to be read left to right or top to bottom should be given in the bullet points too (same for the previous info if correct)
    • how many imposed letters? always 1?
  • user9644768 Avatar
    crossword_2x2(('#_', '_G'))
     # input is a tuple of 2 strings
     # should return a list of tuples:
      [('AG', 'UG',  6), ('UG', 'AG',  6)]
    

    and

    The task is to return all valid solutions

    Why (UG, UG) is not a valid solution?