Skip to content

krizaljka

bradendubois edited this page Jun 9, 2021 · 6 revisions

Križaljka

ID: krizaljka

Difficulty: 1.8

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, create a B x A sized grid of "."s, and iterate through the letters of A, seeing what index (if any) they are found in B; if found, stop; the index of this letter in A and its occurrence in B is essentially the (x, y) point the words intersect at. Therefore, write A (starting from the left) along the grid at the y value, and write B (starting from the top) down the grid at the x value.

Clone this wiki locally