filmov
tv
Find Elements in a Contaminated Binary Tree - Leetcode 1261 | Using DFS

Показать описание
Given a binary tree with the following rules:
For any treeNode:
Implement the FindElements class:
FindElements(TreeNode* root) Initializes the object with a contaminated binary tree and recovers it.
bool find(int target) Returns true if the target value exists in the recovered binary tree.
For any treeNode:
Implement the FindElements class:
FindElements(TreeNode* root) Initializes the object with a contaminated binary tree and recovers it.
bool find(int target) Returns true if the target value exists in the recovered binary tree.