Created
January 9, 2020 07:09
-
-
Save elcolie/0e012bdebcb66f2146e98fe60f56be7c to your computer and use it in GitHub Desktop.
codeware1
This file contains hidden or 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
| sample = { | |
| "name": "green", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "house", | |
| "score": 1, | |
| "children": [] | |
| }, | |
| { | |
| "name": "martian", | |
| "score": 5, | |
| "children": [] | |
| }, | |
| { | |
| "name": "som tum", | |
| "score": 3, | |
| "children": [] | |
| } | |
| ] | |
| } | |
| exam1 = { | |
| "name": "codewars is a ", | |
| "score": 0, | |
| "children": [ | |
| { | |
| "name": "gentle", | |
| "score": 2, | |
| "children": [ | |
| { | |
| "name": "turn for", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "elegant", | |
| "score": 2, | |
| "children": [ | |
| { | |
| "name": "devisers", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "designers", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "witchs", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "bald", | |
| "score": 3, | |
| "children": [ | |
| { | |
| "name": "maguses", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "witchs", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "mediums", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "hollow", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "clairvoyants", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "clairvoyants", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "sights", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "chance for", | |
| "score": 3, | |
| "children": [ | |
| { | |
| "name": "panicky", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "maguses", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "sorcerers", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "clairvoyants", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "famous", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "devisers", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "thaumaturges", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "directors", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "unimportant", | |
| "score": 0, | |
| "children": [ | |
| { | |
| "name": "enchanters", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "soothsayers", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "warlocks", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "emergency for", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "faithful", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "schemers", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "mediums", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "astrologers", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "beautiful", | |
| "score": 2, | |
| "children": [ | |
| { | |
| "name": "inventors", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "contrivers", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "enchanters", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "plain", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "managers", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "sorcerers", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "warlocks", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "faithful", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "advent for", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "panicky", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "managers", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "palmists", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "diviners", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "tender", | |
| "score": 0, | |
| "children": [ | |
| { | |
| "name": "astrologers", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "planners", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "clairvoyants", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "helpless", | |
| "score": 0, | |
| "children": [ | |
| { | |
| "name": "soothsayers", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "warlocks", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "witchs", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "matter for", | |
| "score": 3, | |
| "children": [ | |
| { | |
| "name": "proud", | |
| "score": 0, | |
| "children": [ | |
| { | |
| "name": "inventors", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "hypnotists", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "occultists", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "gifted", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "sights", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "mediums", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "maguses", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "unsightly", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "soothsayers", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "thaumaturges", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "architects", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "predicament for", | |
| "score": 2, | |
| "children": [ | |
| { | |
| "name": "panicky", | |
| "score": 3, | |
| "children": [ | |
| { | |
| "name": "hypnotists", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "maguses", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "conjurers", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "helpless", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "shamans", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "shamans", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "warlocks", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "hollow", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "schemers", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "shamans", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "sights", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "happy", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "shift for", | |
| "score": 3, | |
| "children": [ | |
| { | |
| "name": "easy", | |
| "score": 3, | |
| "children": [ | |
| { | |
| "name": "inventors", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "contrivers", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "necromancers", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "wonderful", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "surveyors", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "warlocks", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "thaumaturges", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "lazy", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "architects", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "necromancers", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "planners", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "calamity for", | |
| "score": 2, | |
| "children": [ | |
| { | |
| "name": "brave", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "magicians", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "contrivers", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "astrologers", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "pitiful", | |
| "score": 2, | |
| "children": [ | |
| { | |
| "name": "managers", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "sorcerers", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "warlocks", | |
| "score": 1, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "happy", | |
| "score": 0, | |
| "children": [ | |
| { | |
| "name": "sorcerers", | |
| "score": 4, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "magicians", | |
| "score": 2, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "architects", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "catastrophe for", | |
| "score": 1, | |
| "children": [ | |
| { | |
| "name": "chubby", | |
| "score": 0, | |
| "children": [ | |
| { | |
| "name": "conjurers", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "surveyors", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "planners", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "nervous", | |
| "score": 4, | |
| "children": [ | |
| { | |
| "name": "sorcerers", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "originators", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "planners", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| }, | |
| { | |
| "name": "victorious", | |
| "score": 2, | |
| "children": [ | |
| { | |
| "name": "devisers", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "soothsayers", | |
| "score": 0, | |
| "children": [ | |
| ] | |
| }, | |
| { | |
| "name": "astrologers", | |
| "score": 3, | |
| "children": [ | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment