Format code with prettier (#3375)

This commit is contained in:
acbin
2022-10-03 17:23:00 +08:00
committed by GitHub
parent 32b9b11ed5
commit e96f567bfc
464 changed files with 11483 additions and 6189 deletions

View File

@ -69,7 +69,6 @@ public class CircularQueue {
}
return res;
}
}
public int peek() {
@ -86,7 +85,6 @@ public class CircularQueue {
System.out.println("The Queue is deleted!");
}
public static void main(String[] args) {
CircularQueue cq = new CircularQueue(5);
System.out.println(cq.isEmpty());
@ -110,6 +108,5 @@ public class CircularQueue {
System.out.println(cq.peek());
System.out.println(cq.peek());
cq.deleteQueue();
}
}

View File

@ -121,8 +121,7 @@ public class PriorityQueues {
// [2, 3, 5, 10] Here higher numbers have higher priority, so they are on the top
for (int i = 3; i >= 0; i--) {
System.out.print(
myQueue.remove() + " "); // will print the queue in reverse order [10, 5, 3, 2]
System.out.print(myQueue.remove() + " "); // will print the queue in reverse order [10, 5, 3, 2]
}
// As you can see, a Priority Queue can be used as a sorting algotithm
}