vaskoz / dailycodingproblem-go

problems from dailycodingproblem.com solved in Go
MIT License
95 stars 31 forks source link

Day 458 #925

Closed vaskoz closed 4 years ago

vaskoz commented 4 years ago

Good morning! Here's your coding interview problem for today.

This problem was asked by Uber.

A rule looks like this:

A NE B

This means this means point A is located northeast of point B.

A SW C

means that point A is southwest of C.

Given a list of rules, check if the sum of the rules validate. For example:

A N B
B NE C
C N A

does not validate, since A cannot be both north and south of C.

A NW B
A N B

is considered valid.

vaskoz commented 4 years ago

Identical to Day 87: https://github.com/vaskoz/dailycodingproblem-go/issues/183