GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing leetcodejavascript.com — #1485 - Clone Binary Tree With Random Pointer - LeetCode JavaScript Solutions Back to all solutions #1485 - Clone Binary Tree With Random PointerProblem DescriptionA binary tree is given such that each node contains an additional random pointer which could point to any node in the tree or null. Return a deep copy of the tree. The tree is represented in the same input/output way as normal binary trees where each node is represented as a pair of [val, random_index] where:
You will be given the tree in class Node and you should return the cloned tree in class NodeCopy. NodeCopy class is just a clone of Node class with the same attributes and constructors. Solution |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |