fix: adapt missing ruby style guide (#1216)

This commit is contained in:
khoaxuantu
2024-04-03 20:01:29 +07:00
committed by GitHub
parent c435d177a1
commit 043085d0ea
13 changed files with 84 additions and 84 deletions

View File

@ -17,10 +17,10 @@ end
### 将列表反序列化为链表 ###
def arr_to_linked_list(arr)
head = current = ListNode.new arr[0]
head = current = ListNode.new(arr[0])
for i in 1...arr.length
current.next = ListNode.new arr[i]
current.next = ListNode.new(arr[i])
current = current.next
end