Quick sort with merge array in Go
It works in VScode and Go playground, but Leetcode gave me different result. So I will try to make another solution. package main import "fmt" func main() { nums1 := []int{1, 2, 3, 0, 0, 0} nums2 := []int{2, 5, 6} merge(nums1, len(nums1), nums2, len(nums2)) fmt.Println(nums1) // [1 2 2 3 5 6] } func merge(nums1 []int, m int, nums2 []int, n int) { count := 0 temp := append(nums1, nums2...) temp =..
Go/Leet Code
2022. 2. 24. 00:33