mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2026-03-13 10:02:05 +08:00
添加 problem 19
This commit is contained in:
@@ -77,35 +77,3 @@ func Test_Problem2(t *testing.T) {
|
||||
}
|
||||
fmt.Printf("\n\n\n")
|
||||
}
|
||||
|
||||
// // convert *ListNode to []int
|
||||
// func L2s(head *ListNode) []int {
|
||||
// res := []int{}
|
||||
|
||||
// for head != nil {
|
||||
// res = append(res, head.Val)
|
||||
// head = head.Next
|
||||
// }
|
||||
|
||||
// return res
|
||||
// }
|
||||
|
||||
// // convert []int to *ListNode
|
||||
// func S2l(nums []int) *ListNode {
|
||||
// if len(nums) == 0 {
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// res := &ListNode{
|
||||
// Val: nums[0],
|
||||
// }
|
||||
// temp := res
|
||||
// for i := 1; i < len(nums); i++ {
|
||||
// temp.Next = &ListNode{
|
||||
// Val: nums[i],
|
||||
// }
|
||||
// temp = temp.Next
|
||||
// }
|
||||
|
||||
// return res
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user