diff --git a/algorithms/001325-delete-leaves-with-a-given-value/README.md b/algorithms/001325-delete-leaves-with-a-given-value/README.md index 943c82b66..1bf453bf9 100644 --- a/algorithms/001325-delete-leaves-with-a-given-value/README.md +++ b/algorithms/001325-delete-leaves-with-a-given-value/README.md @@ -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] ?> ```