DEV Community

Discussion on: A Facebook Interview Question

Collapse
 
cindyytong profile image
Cindy Tong

Hi @dbenchi ! As always nice touch on the front end, great use of semantically defined variables and love your consistency to our weekly challenges. For your solution, what happens when we have disconnected nodes? For example, if strArr = ["(3,2)", "(4,5)" ] should this return true or false?

Collapse
 
dbenchi profile image
David BENCHI • Edited

IMHO it should return false. I will modify my code in a hour to consider this corner case

[Edit]: Code fixed ;-)