Skip to content

Added solution for Problem 1028 in Java using Stack #2

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

Merged

Conversation

vishrutimahajan
Copy link
Contributor

@vishrutimahajan vishrutimahajan commented Apr 12, 2025

name: "Pull Request"
description: "Added solution for LeetCode Problem 1028"
labels: ["solution"]

πŸ“Œ Description

Added solution for LeetCode Problem 1028 – Recover a Tree From Preorder Traversal in Java using Stack.

πŸ” Related Issue
N/A

πŸš€ Changes Made
Added RecoverTreeFromPreorder.java in the Java/ folder.
Wrote a clean, commented solution using a Stack to build the binary tree.
Added main() function for quick testing.
Included preorder traversal print for validation.

πŸ“ Checklist
Solution is in the correct folder (Java/).
Code is well-formatted and commented.
Problem description and test case added.
No plagiarism β€” original solution.

πŸ“· Screenshots (if applicable)

image

πŸ’¬ Additional Notes

N/A

Copy link
Owner

@vishwajeetmishra4 vishwajeetmishra4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, Vishruti Mahajan ! Great work. Looking forward to more!
first-contribution

@vishwajeetmishra4 vishwajeetmishra4 merged commit 6189808 into vishwajeetmishra4:main Apr 12, 2025
1 check failed
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.

2 participants