Filter by language, tag, or search to discover useful patterns.
test 2
@test
Heap Sort sử dụng Max Heap để sắp xếp mảng tăng dần: Các bước: Xây dựng Max Heap từ mảng đầu vào. Lặp lại: Hoán đổi phần tử đầu (arr[0], lớn nhất) với phần tử cuối chưa được sắp xếp. Giảm kích thước heap (loại bỏ phần tử đã xếp). Heapify lại cây từ gốc để duy trì tính chất max-heap. Kết thúc khi heap còn 1 phần tử.
Casey Liu
@caseyl
Maximum subarray sum using Kadane's approach.
Casey Liu
@caseyl
Heap-based solution to retrieve the k most frequent integers.
Avery Johnson
@averycodes
Binary search implementation over sorted arrays.