Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am richardba on github.
  • I am richardtrle (https://keybase.io/richardtrle) on keybase.
  • I have a public key ASB7u40YRY69WWmL9uSpx5CZ5qrKRUlc1kwmw11qJuNfNwo

To claim this, I am signing this object:

function findZeroOrOneParentage(input)
{
var objects = {}
var set = new Set()
input.forEach(function(elem){
if(objects[elem[0]] === undefined)
objects[elem[0]] = []
if(objects[elem[1]] === undefined)
objects[elem[1]] = []