LeetCode 451: Sort Characters By Frequency
A clear explanation of sorting characters by decreasing frequency using a hash map and sorting.
8 notes
A clear explanation of sorting characters by decreasing frequency using a hash map and sorting.
A clear explanation of Top K Frequent Elements using frequency counting and bucket sort.
A clear explanation of checking nearby indices with nearby values using a sliding window and bucket hashing.
A clear explanation of finding the maximum adjacent gap in sorted order using buckets and the pigeonhole principle.
External-memory bucket sort that partitions records into ordered buckets stored on disk and sorts each bucket separately.
Bucket sort variant that assumes uniform distribution and uses equal-width buckets with simple mapping.
Distribute elements into buckets based on value ranges and sort each bucket independently.
Distribute elements into buckets by value range, sort each bucket, then concatenate — achieving linear expected time on uniformly distributed input.