Skip to content

Conversation

TeodorRussu
Copy link

No description provided.

@@ -9,6 +9,9 @@
*/
public class RemoveDuplicates {

public static final String WITHOUT_DUPS = "Without dups: ";
Copy link
Owner

Choose a reason for hiding this comment

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

Can be private?

@@ -38,7 +38,7 @@ private static int pop() {
}

private static Stack<Integer> getLastStack() {
if (stackList.size() == 0 || isFull(stackList.get(stackList.size() - 1))) {
if (stackList.isEmpty() || isFull(stackList.get(stackList.size() - 1))) {
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@@ -53,10 +56,10 @@ public static void main(String[] args) {
l2.next.next.next = new Node(3);
l2.next.next.next.next = new Node(4);
l2.next.next.next.next.next = new Node(5);
System.out.print("\nWith dups: ");
System.out.print(WITH_DUPS);
Copy link
Owner

Choose a reason for hiding this comment

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

\n is omitted.

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