mathsjery JF-Expert Member Joined Sep 26, 2015 Posts 2,287 Reaction score 1,855 Jun 29, 2021 #1 Given a rectangular grid of characters, print the longest string that forms a lexicographically ordered path through the grid. Characters are between " (ascii 32) and " (ascii 126) inclusively. The rows of the grid are separated by newlines (ascii 10) and should not be interpreted as characters in the grid. Paths will not necessarily be sequential (characters can be skipped). They can start and end anywhere in the grid. They can change directions at any time, go in any direction, diagonally, or even cross themselves. If there's a tie for longest, return the path that comes first lexicographically.
Given a rectangular grid of characters, print the longest string that forms a lexicographically ordered path through the grid. Characters are between " (ascii 32) and " (ascii 126) inclusively. The rows of the grid are separated by newlines (ascii 10) and should not be interpreted as characters in the grid. Paths will not necessarily be sequential (characters can be skipped). They can start and end anywhere in the grid. They can change directions at any time, go in any direction, diagonally, or even cross themselves. If there's a tie for longest, return the path that comes first lexicographically.
Mlolongo JF-Expert Member Joined Jul 4, 2019 Posts 3,654 Reaction score 6,553 Jun 29, 2021 #2 Ungeweka na mfano/image/mchoro/picha inayoo illustrate maelezo hayo yanayo changanya.
mathsjery JF-Expert Member Joined Sep 26, 2015 Posts 2,287 Reaction score 1,855 Jun 29, 2021 Thread starter #3 Mlolongo said: Ungeweka na mfano/image/mchoro/picha inayoo illustrate maelezo hayo yanayo changanya. Click to expand... Au sio!
Mlolongo said: Ungeweka na mfano/image/mchoro/picha inayoo illustrate maelezo hayo yanayo changanya. Click to expand... Au sio!