mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-07 23:04:55 +08:00
补充完整对应的ts类型
This commit is contained in:
@ -20,7 +20,7 @@ export default class ListNode {
|
||||
* @param arr
|
||||
* @return
|
||||
*/
|
||||
arrToLinkedList(arr: number[]) {
|
||||
arrToLinkedList(arr: number[]): ListNode | null {
|
||||
const dum: ListNode = new ListNode(0);
|
||||
let head = dum;
|
||||
for (const val of arr) {
|
||||
|
Reference in New Issue
Block a user