Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and Improvement #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

prithvi007
Copy link

  1. Fixed output issue with zigzagLevelOrder function
    As the expected result, as mentioned above in the file was:
    [
    [3],
    [20,9],
    [15,7]
    ]

    The function was returning the result as:
    [
    [3],
    [9,20],
    [7,15]
    ]

  2. I was struggling myself to know the input for the zigzagLevelOrder function.
    Found it at last. And wanted to contribute it. Thought it would be helpful to others.
    So I added a input variable binaryTree with the value, which is an input to zigzagLevelOrder function,
    And also consoled the result with an index.html file, so that people can just clone the repo and see the result in browser
    console quickly and play around.

  3. Update the zigzagLevelOrder function to arrow function and change var to const declaration.

…function and added console log to display the output using index.html file
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