Blog
In-depth articles on AI agents, LLM engineering, servers, Python and software development.
### Bubble Sort: A Comprehensive Analysis of a Basic Sorting Algorithm Bubble Sort is based on the "bubble rising" principle. Its core idea is to repeatedly compare adjacent elements and swap those i
Radix sort is a non-comparison integer sorting algorithm that processes digits from the least significant to the most significant. It distributes each number into "buckets" based on the current digit,
Bucket sort is a non-comparison-based sorting algorithm. Its core idea is to distribute data into several "buckets", sort each bucket locally, and then merge the sorted buckets. It is suitable for sce
Counting sort is a simple and intuitive non-comparison sorting algorithm. It determines the position of elements by counting their occurrences and using prefix sums. It is suitable for scenarios where
Merge sort is an efficient sorting algorithm based on the divide-and-conquer paradigm, with three core steps: divide, conquer, and merge. It recursively splits the array into single-element subarrays,
Heap sort is an efficient sorting algorithm based on the heap data structure, with a time complexity of O(n log n) and a space complexity of O(1). It is an in-place sorting algorithm suitable for larg
Selection sort is a simple and intuitive sorting algorithm. Its core idea is to repeatedly select the smallest (or largest) element from the unsorted portion and place it at the end of the sorted port
Shell Sort is an improved version of Insertion Sort that reduces the number of element movements during inversions by grouping elements. The core idea is to introduce a step size (Gap), which divides
Insertion sort is a simple and intuitive sorting algorithm. Its core idea is to insert unsorted elements one by one into their correct positions in the sorted part, similar to organizing playing cards
QuickSort is based on the divide-and-conquer approach. Its core involves selecting a pivot element to partition the array into elements less than and greater than the pivot, followed by recursively so