You are hereAlgorithm of the Week: Bucket Sort

Algorithm of the Week: Bucket Sort


By www - Posted on 02 January 2013

Introduction

What’s the fastest way to sort the following sequence [9, 3, 0, 5, 4, 1, 2, 6, 8, 7]? Well, the question is a bit tricky since the input is somehow “predefined”. First of all, we have only integers and fortunately they are all different. That’s great and we know that in practice it’s almost impossible to count on such lucky coincidence. However, here we can sort the...