refactor: change function sign for QuickSort

This commit is contained in:
dudaodong
2022-08-22 11:02:25 +08:00
parent 36169874e5
commit 24f18aaaec
4 changed files with 12 additions and 8 deletions

View File

@@ -141,7 +141,7 @@ func TestQuickSort(t *testing.T) {
{Name: "e", Age: 28},
}
comparator := &peopleAgeComparator{}
QuickSort(peoples, 0, len(peoples)-1, comparator)
QuickSort(peoples, comparator)
expected := "[{d 8} {b 10} {c 17} {a 20} {e 28}]"
actual := fmt.Sprintf("%v", peoples)