Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/kotlin/g0801_0900/s0855_exam_room/ExamRoom.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ExamRoom() {
var maxAtLeft: Node? = null
var cur = tail.pre
while (cur !== head && cur!!.pre !== head) {
val pre = cur!!.pre
val pre = cur.pre
val at = (cur.`val` + pre!!.`val`) / 2
val distance = at - pre.`val`
if (distance >= max) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Solution {
curr = curr!!.next
key += curr!!.`val`
}
map.getValue(preSum).next = curr!!.next
map.getValue(preSum).next = curr.next
} else {
map[preSum] = curr
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package g2801_2900.s2815_max_pair_sum_in_an_array
// #Easy #Array #Hash_Table #2023_12_06_Time_223_ms_(82.35%)_Space_37.6_MB_(100.00%)

import java.util.PriorityQueue
import kotlin.collections.HashMap
import kotlin.math.max

@Suppress("NAME_SHADOWING")
Expand Down