File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed 
g0801_0900/s0855_exam_room 
g1101_1200/s1171_remove_zero_sum_consecutive_nodes_from_linked_list 
g2801_2900/s2815_max_pair_sum_in_an_array Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ class ExamRoom() {
5050        var  maxAtLeft:  Node ?  =  null 
5151        var  cur =  tail.pre
5252        while  (cur != =  head &&  cur!! .pre != =  head) {
53-             val  pre =  cur!! .pre
53+             val  pre =  cur.pre
5454            val  at =  (cur.`val ` +  pre!! .`val `) /  2 
5555            val  distance =  at -  pre.`val `
5656            if  (distance >=  max) {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class Solution {
3030                    curr =  curr!! .next
3131                    key + =  curr!! .`val `
3232                }
33-                 map.getValue(preSum).next =  curr!! .next
33+                 map.getValue(preSum).next =  curr.next
3434            } else  {
3535                map[preSum] =  curr
3636            }
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package g2801_2900.s2815_max_pair_sum_in_an_array
33//  #Easy #Array #Hash_Table #2023_12_06_Time_223_ms_(82.35%)_Space_37.6_MB_(100.00%)
44
55import  java.util.PriorityQueue 
6- import  kotlin.collections.HashMap 
76import  kotlin.math.max 
87
98@Suppress(" NAME_SHADOWING" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments