Another code challenge, today warm up!

Another code challenge, today warm up!

mathsjery

JF-Expert Member
Joined
Sep 26, 2015
Posts
2,287
Reaction score
1,855
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.
 
Ungeweka na mfano/image/mchoro/picha inayoo illustrate maelezo hayo yanayo changanya.
 
Back
Top Bottom