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