Files
Yudong Jin 2f561d3d51 feat(ko): add the Korean online edition (#2006)
* feat(ko): add the complete Korean online edition

* Use UTF-8 for Python CI output on Windows

* Remove print-book promotion from the Korean site

* fix(ko): preserve emphasis before Korean particles
2026-10-29 03:46:43 +08:00

25 lines
483 B
Dart

/**
* File: list_node.dart
* Created Time: 2023-01-23
* Author: Jefferson ([email protected])
*/
/* 연결 리스트 노드 */
class ListNode {
int val;
ListNode? next;
ListNode(this.val, [this.next]);
}
/* 리스트를 연결 리스트로 역직렬화 */
ListNode? listToLinkedList(List<int> list) {
ListNode dum = ListNode(0);
ListNode? head = dum;
for (int val in list) {
head?.next = ListNode(val);
head = head?.next;
}
return dum.next;
}