Skip to content

Commit

Permalink
#267, #268 leetcode problems 001325-delete-leaves-with-a-given-value …
Browse files Browse the repository at this point in the history
…submissions 1260759989

Co-authored-by: kovatz <[email protected]>
Co-authored-by: topugit <[email protected]>
Co-authored-by: basharul-siddike <[email protected]>
Co-authored-by: hafijul233 <[email protected]>
  • Loading branch information
5 people committed Jan 17, 2025
1 parent 95f5d70 commit 90a3cfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions algorithms/001325-delete-leaves-with-a-given-value/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ function removeLeafNodes($root, $target) {
// Example usage:
$root = [1,2,3,2,null,2,4];
$target = 2;
echo removeLeafNodes($root, $target) . "\n"; // Output: 17
echo removeLeafNodes($root, $target) . "\n"; // Output: [1,null,3,null,4]

$root = [1,3,3,3,2];
$target = 3;
echo removeLeafNodes($root, $target) . "\n"; // Output: 4
echo removeLeafNodes($root, $target) . "\n"; // Output: [1,3,null,null,2]

$root = [1,2,null,2,null,2];
$target = 2;
echo removeLeafNodes($root, $target) . "\n"; // Output: 10
echo removeLeafNodes($root, $target) . "\n"; // Output: [1]
?>
```

Expand Down

0 comments on commit 90a3cfc

Please sign in to comment.