Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc048861

Browse files
update 3237
1 parent8bce341 commitc048861

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

‎src/main/java/com/fishercoder/solutions/fourththousand/_3237.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ public class _3237 {
77
publicstaticclassSolution1 {
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
publicint[]simulationResult(int[]windows,int[]queries) {
1214
Map<Integer,DoublyLinkedListNode>map =newHashMap<>();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp