Questions tagged [bucket-sort]

Bucket sort is mainly useful when input is uniformly distributed over a range. Use this tag for implementations of the Bucket sort algorithm.

Filter by
Sorted by
Tagged with
3
votes
1answer
76 views

Sorts and data structures: a bucket sort

I am currently going through and implementing basic algorithms and data structures as I feel I didn't learn enough about this during my Data Structures and Algorithms unit. So far I've done the ...
3
votes
0answers
111 views

C# code for minimizing the sum of an array by dividing it's elements (repetition allowed) by 2 for k times

The assumption is that k is quite large as compared to no. of elements in the array and division by 2 returns ceiling of the result. Request for your review and suggestions for further improvements ...
6
votes
3answers
1k views

LeetCode: Top K Frequent Elements C#

https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/799 Given a non-empty array of integers, return the k most frequent elements. Example 1: ...