Visitar URL original
Create SortStackUsingStack.java by harshmlstack · Pull Request #3394 · TheAlgorithms/Java · GitHub
The Wayback Machine - https://web.archive.org/web/20260419003230/https://github.com/TheAlgorithms/Java/pull/3394
Skip to content

Create SortStackUsingStack.java#3394

Closed
harshmlstack wants to merge 1 commit intoTheAlgorithms:masterfrom
harshmlstack:patch-1
Closed

Create SortStackUsingStack.java#3394
harshmlstack wants to merge 1 commit intoTheAlgorithms:masterfrom
harshmlstack:patch-1

Conversation

@harshmlstack
Copy link
Copy Markdown

@harshmlstack harshmlstack commented Oct 4, 2022 •

Created a code for stack sorting using another stack only.
time complexity = O(n^2)
space complexity = O(n)

Describe your change:

  • Add an algorithm

References

Sort stack using another stack #3348

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Java files are placed inside an existing directory.
  • All filenames are in all uppercase characters with no spaces or dashes.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #3348 .

Created a code for stack sorting using another stack only.
time complexity  = O(n^2)
space complexity = O(n)
Issue Related - Sort stack using another stack TheAlgorithms#3348
@harshmlstack harshmlstack deleted the patch-1 branch October 12, 2022 16:39
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