Skip to content

Added QueueUsingTwoStacks.java class in Other folder#229

Merged
varunu28 merged 2 commits into
TheAlgorithms:masterfrom
sahilb2:master
Oct 20, 2017
Merged

Added QueueUsingTwoStacks.java class in Other folder#229
varunu28 merged 2 commits into
TheAlgorithms:masterfrom
sahilb2:master

Conversation

@sahilb2

@sahilb2 sahilb2 commented Oct 19, 2017

Copy link
Copy Markdown
Contributor

QueueUsingTwoStacks.java implements the Queue data structure using two Stacks. Implementation and runtime explained in the comments.

@varunu28 varunu28 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Add a main method
  • Keep all the current functionality of Queue class in a separate class (You can call it QueueWithTwoStacks) and just keep the main method in QueueUsingTwoStacks in which you create an object of the QueueWithTwoStacks and test your logic

@sahilb2

sahilb2 commented Oct 20, 2017

Copy link
Copy Markdown
Contributor Author

Added a main method with test cases for Queue

@varunu28 varunu28 merged commit 598783d into TheAlgorithms:master Oct 20, 2017
@varunu28

Copy link
Copy Markdown
Contributor

@sahilb2 Thanks for the PR

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