Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mosnad-web01/whereiswaldo


https://github.com/mosnad-web01/whereiswaldo

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

## Where's Waldo?

Return the coordinates ([row, col]) of the element that differs from the rest.

### Notes:

- Rows and columns are 1-indexed (not zero-indexed).
- If you get stuck on a challenge please search it online and try to find resources
- If you are really stuck, please ask your Instructors.

### Examples:

whereIsWaldo([
["A", "A", "A"],
["A", "A", "A"],
["A", "B", "A"]
]) ➞ [3, 2]

whereIsWaldo([
["c", "c", "c", "c"],
["c", "c", "c", "d"]
]) ➞ [2, 4]

whereIsWaldo([
["O", "O", "O", "O"],
["O", "O", "O", "O"],
["O", "O", "O", "O"],
["O", "O", "O", "O"],
["P", "O", "O", "O"],
["O", "O", "O", "O"]
]) ➞ [5, 1]