mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-20 02:26:11 +00:00
Re-translate the Japanese version (#1871)
* Retranslate Japanese docs with GPT-5.4 * Retranslate Japanese code with GPT-5.4
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* File: list_node.dart
|
||||
* Created Time: 2023-01-23
|
||||
* Author: Jefferson (JeffersonHuang77@gmail.com)
|
||||
*/
|
||||
|
||||
/* 連結リストノード */
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user