Skip to content

Update Pathsum.cpp - #143

Open
shrivalidutt wants to merge 1 commit into
Saikat2407:mainfrom
shrivalidutt:main
Open

Update Pathsum.cpp#143
shrivalidutt wants to merge 1 commit into
Saikat2407:mainfrom
shrivalidutt:main

Conversation

@shrivalidutt

Copy link
Copy Markdown

The NULL check at the beginning of hasPathSum() was removed because the checkPathSum() function already handles the NULL case. The and was replaced with && in if (root->left == NULL && root->right == NULL) to ensure correct C++ syntax.

The NULL check at the beginning of hasPathSum() was removed because the checkPathSum() function already handles the NULL case. 
The and was replaced with && in if (root->left == NULL && root->right == NULL) to ensure correct C++ syntax.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant