3 ms·
I think it is, and I have to disagree with you. I think it is a very interesting puzzle for candidates. The array is basically a tree A[K] and the jump is a poi
by bjourne 12y ago
I think it is, and I have to disagree with you. I think it is a very interesting puzzle for candidates. The array is basically a tree A[K] and the jump is a pointer to its parent node. If the jump is out of the array, A[K] is a root. Your task appears to be to find the max depth of the graph or return -1 if it contains cycles.
- quaiks 12y agoA tree?? I can't see any tree.