func readFromFile() []int { numbers, err := algocourse.ParseFileWithIntsOnEveryLine("QuickSort.txt") if err != nil { panic("Failed to read file: " + err.Error()) } return numbers }
func main() { numbers, _ := algocourse.ParseFileWithIntsOnEveryLine("IntegerArray.txt") nInversions := MergeSortCountingInversions(numbers) fmt.Println("Inversions: ", nInversions) }
func main() { numbers, _ := algocourse.ParseFileWithIntsOnEveryLine("QuickSort.txt") fmt.Println("Comparisons: ", Quicksort(numbers, Ex1)) }