Skip to content

Instantly share code, notes, and snippets.

@sargo
Created November 26, 2015 15:47
Show Gist options
  • Save sargo/8c75ba58790b230fcf08 to your computer and use it in GitHub Desktop.
Save sargo/8c75ba58790b230fcf08 to your computer and use it in GitHub Desktop.

#GROT interview question

Take a look at GROT game. Write algorithm that will find longest chain (return coordinates of start point). As sample input use:

sample = [
    ['u', 'd', 'u', 'u'], # ↑ ↓ ↑ ↑
    ['u', 'r', 'l', 'l'], # ↑ → ← ←
    ['u', 'u', 'l', 'u'], # ↑ ↑ ← ↑
    ['l', 'd', 'u', 'l'], # ← ↓ ↑ ←
]

Checks:

  • problem solving
  • data structure manipulation
  • code organization
  • code style (pep8, correct variables naming)
@dzon4xx
Copy link

dzon4xx commented Feb 23, 2017

Hi. I would like to present my solution of problem:
https://github.com/dzon4xx/grot

@dopiotrko
Copy link

Hi. I would like to present my solution of problem. Short enough to write on job interview:
https://github.com/dopiotrko/GROT-solution

@akurczyk
Copy link

akurczyk commented Nov 3, 2019

@pawel-slowik
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment