Skip to content

harshaaaaaaaaaa/Radix-sort-vs-Bucket-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#Radix vs Bucket sort time

Introduction

This is a C code that compares the performance of two sorting algorithms, Radix Sort and Bucket Sort. The code generates a random array of integers and then sorts the array using both Radix Sort and Bucket Sort. Finally, the code prints the sorting time for both algorithms.

Usage

To compile and run the code, you can use the following commands:

gcc -o radix_and_bucket_sort radix_and_bucket_sort.c
./radix_and_bucket_sort

This will print the sorting time for Radix Sort and Bucket Sort. The code is designed to be used with a large array of integers, so it may take some time to run.

Performance Comparison

The performance of Radix Sort and Bucket Sort depends on the specific data set and the number of buckets used. However, in general, Radix Sort is slightly faster than Bucket Sort.

Conclusion

This code provides a simple way to compare the performance of Radix Sort and Bucket Sort. The code can be easily modified to use different sorting algorithms or to sort different types of data.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages