deno.land / x / masx200_leetcode_test@10.6.5 / reverse-linked-list / index.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { ListNode } from "./ListNode.ts";
export default function reverse_Linked_List( head: ListNode | null,): ListNode | null { let ans = null; let x = head; while (x != null) { ans = new ListNode(x.val, ans); x = x.next; } return ans;}
masx200_leetcode_test

Version Info

Tagged at
a year ago