We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The Tree Of Life
The Tree Of Life
Sort by
recency
|
13 Discussions
|
Please Login in order to post a comment
The problem statement is garbage. Instead of trying to sound impressive by using words like "Turing complete" and "linear automaton", the author should've spent more time in lucidly stating the problem statement.
Took me 2 days but fixed by using some randomness to deal with
incase anyone was looking for solution :
I'm passing all but two tests, and failing because of a time limit. My process is that I convert the string into a tree data structure, then I call a function that keeps the tree data structure but each node also has info about it's parent and children values. Then I map the rules onto the nodes (with parent and child info) onto the tree to get the new nodes. My traversal is straight forward. Is this the most efficient outline? I must have efficiency losses somewhere
A query has the form
number path
Is the
path
taken from the root, or from the point you just left off?Is the number the
n
th evolution from the start, or then
th evolution from the last time?