Skip to content

Given a stream of compass directions, finds unique locations visited

Notifications You must be signed in to change notification settings

jamiecuthill/uniqlocations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unique Location Engineering Challenge

Given a string is input to the application containing compass directions (NESW) the result is an integer for the number of unique locations visited. The origin (starting position) does not count as a visited location unless you revist it on your travels.

Example

The input of "NESSWWNNES" would draw this map, starting at o and finishing in the same position.


. . . . .
. x x x .
. x o x .
. x x x .
. . . . .

The application will return the number 9.

About

Given a stream of compass directions, finds unique locations visited

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages