We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bce341 commit c048861Copy full SHA for c048861
src/main/java/com/fishercoder/solutions/fourththousand/_3237.java
@@ -7,6 +7,8 @@ public class _3237 {
7
public static class Solution1 {
8
/**
9
* My completely original solution, very natural to think of doubly linked list + hashmap.
10
+ * Whenever a window is chosen (iterating on in the queries array), that window will be put onto the head of the list,
11
+ * all other windows will be pushed to the right by one position.
12
*/
13
public int[] simulationResult(int[] windows, int[] queries) {
14
Map<Integer, DoublyLinkedListNode> map = new HashMap<>();
0 commit comments