Skip to content

Instantly share code, notes, and snippets.

@duggi
Created February 19, 2011 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duggi/835455 to your computer and use it in GitHub Desktop.
Save duggi/835455 to your computer and use it in GitHub Desktop.
-- Groupit Programming Test --
Given the data structure below, run through it and print
the name property of each member as a tree. Paste the code
at the bottom of this test, in the “Solution” section.
Note this data is presented as a javascript hash; feel free
to use the language of your liking, porting the data structure
as necessary. Spend up to an hour on the problem.
family.children = {
mary: {
name: 'Mary',
children: {
john: {
name: 'John'
},
phil: {
name: 'Phil',
children: {
stacey: {
name: 'Stacey'
},
linda: {
name: 'Linda'
}
}
}
}
}
}
------------------------
SOLUTION:
(paste here)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment