Testing Radix Sort Implementation in hello-algo
This test suite validates the implementation of Radix Sort algorithm in Go, focusing on sorting large integers through digit-by-digit processing. The tests demonstrate the effectiveness of radix sort for handling multi-digit numerical values while maintaining algorithmic efficiency.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
krahets/hello-algo
zh-hant/codes/go/chapter_sorting/radix_sort_test.go
// File: radix_sort_test.go
// Created Time: 2023-01-18
// Author: Reanon ([email protected])
package chapter_sorting
import (
"fmt"
"testing"
)
func TestRadixSort(t *testing.T) {
/* 基數排序 */
nums := []int{10546151, 35663510, 42865989, 34862445, 81883077,
88906420, 72429244, 30524779, 82060337, 63832996}
radixSort(nums)
fmt.Println("基數排序完成後 nums = ", nums)
}