DEV Community

Discussion on: A Facebook Interview Question

cindyytong profile image
Cindy Tong Author

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?

dbenchi profile image
David BENCHI • Edited on

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

[Edit]: Code fixed ;-)