Implementing Sorting Algorithms for Data Structures