diff options
author | Jack Sangdahl <[email protected]> | 2025-02-03 15:37:19 -0700 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2025-02-03 15:37:19 -0700 |
commit | 55a67f776dd9acd258cae16ffb636751666b0f40 (patch) | |
tree | 601539de43809b70ceb8228a12c35883fa300b03 /binary_tree_cameras.cpp | |
parent | a0030873dabb517594ae0394350d6715071f7fb8 (diff) | |
download | leetcode-55a67f776dd9acd258cae16ffb636751666b0f40.tar.gz leetcode-55a67f776dd9acd258cae16ffb636751666b0f40.zip |
chore: Remove incomplete solutions
Diffstat (limited to 'binary_tree_cameras.cpp')
-rw-r--r-- | binary_tree_cameras.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/binary_tree_cameras.cpp b/binary_tree_cameras.cpp deleted file mode 100644 index c73650b..0000000 --- a/binary_tree_cameras.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int ans; - int minCameraCover(TreeNode *root) { - if (helper(root) == 0) - ans++; - return ans; - } - -private: - int helper(TreeNode *root) { - if (!root) - return 1; - int l = helper(root->left); - int r = helper(root->right); - if (l == 0 || r == 0) { - ans++; - return 2; - } else if (l == 2 || r == 2) - return 1; - else - return 0; - } -}; - -int main() {} |