Created
February 19, 2011 22:50
-
-
Save duggi/835455 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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