Join Raghavendra Dixit for an in-depth discussion in this video Bucket sort, part of Introduction to Data Structures & Algorithms in Java.
- [Instructor] Now let's come to the last sorting algorithm…of this course,…bucket sort, which is also known as bin sort.…This algorithm takes a mixed approach…from counting and radix sort algorithms,…and works quite well for integers.…So let's assume we have this array,…and if you look at the data,…the most significant digit in these numbers…is at the hundreds position, right?…So what we do in case of bucket sort…is that we create this auxiliary array…whose indices contain all the digits of the number system.…
Like here, we are dealing with the decimal number system,…so we are using a ten-element array whose indices,…zero to nine, cover all the digits of this number system.…And we will look at the digit in the highest significant,…and based on what digit it is,…we will store that number at the appropriate index.…So here, we read the number two,…and the digit at its hundreds place is zero,…so we store this number in the zeroth index.…
Then the next number is 90,…which also has a zero at the hundreds position,…so this also should be stored in the zeroth index,…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Why study data structures and algorithms?
- How to calculate the time complexity
- Using Big O notation
- Using basic sorting and search algorithms
- Searching elements in unordered arrays and ordered arrays
- Implementing a linked list in Java
- Implementing stacks using arrays
- Queues using arrays
- Binary search trees
- Representing heaps using arrays
Skill Level Intermediate
1. Introduction to Algorithms
2. Analysis of Algorithms
3. Basic Sorting and Search Algorithms
4. Linked Lists
5. Stacks and Queues
7. Binary Search Trees
8. More Sorting Algorithms
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.