Skip to content

Commit c048861

Browse files
update 3237
1 parent 8bce341 commit c048861

File tree

1 file changed

+2
-0
lines changed
  • src/main/java/com/fishercoder/solutions/fourththousand

1 file changed

+2
-0
lines changed

Diff for: src/main/java/com/fishercoder/solutions/fourththousand/_3237.java

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ public class _3237 {
77
public static class Solution1 {
88
/**
99
* 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.
1012
*/
1113
public int[] simulationResult(int[] windows, int[] queries) {
1214
Map<Integer, DoublyLinkedListNode> map = new HashMap<>();

0 commit comments

Comments
 (0)