Skip to content

Commit

Permalink
fix: changed access specifier of reverese method to private
Browse files Browse the repository at this point in the history
  • Loading branch information
NirmalSilwal committed Sep 8, 2020
1 parent dfd5df8 commit 4e9a002
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void display() throws Exception {
reverseStack(primaryStack, secStack, 0);
}

public void reverseStack(DynamicStack s1, DynamicStack s2, int id) throws Exception {
private void reverseStack(DynamicStack s1, DynamicStack s2, int id) throws Exception {
if (s1.isEmpty()) {
return;
}
Expand Down

1 comment on commit 4e9a002

@NirmalSilwal
Copy link
Owner Author

Choose a reason for hiding this comment

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

as we don't want reverseStack() method to be accessed by other class, we'r using it inside this class only to disply() queue, so we make it private.

Please sign in to comment.