An open API service indexing awesome lists of open source software.

https://github.com/blesson-tomy/s3_data_structures_lab

Programs done during a Data Structures Lab
https://github.com/blesson-tomy/s3_data_structures_lab

c datastructures linkedlist sorting

Last synced: 3 months ago
JSON representation

Programs done during a Data Structures Lab

Awesome Lists containing this project

README

        

# S3_Data_Structures_Lab

A data structure is the fundamental method of organising and storing data for efficient use in modern systems. It is implemented by all the companies that work with technology to store, process and retrieve large amounts of data.

SORTING
There are various sorting techniques in data structures that allow us to efficiently arrange data based on the order of numbers or characters.
There are a few techniqies of sorting data:
1. Quicksort
2. Selection Sort
3. Insertion Sort
4. Heap Sort
5. Bubble Sort

---------------------------------------------------------------------------------------------------------------------------------------------

1. Quicksort

Quicksort algorithm uses the divide and conquer method. It partitions the unsorted elements based on the pivot element. After each iteration,
the partition element is placed at the correct position in the array. The iterations repeat until all elements are placed in their respective correct positions.

Time Complexity:
Worst Case: O(n^2)
Best Case: O(nlog N)

2. Insertion Sort

Time Complexity:
Worst Case: O(N^2)
Best Case: O(N)

3. Bubble Sort

Time Complexity:
Worst Case: O(N^2)
Best Case: O(N)

4. Selection Sort

Selection sort works by selecting the smallest element in the array and putting it into the 'sorted' array and the rest in the 'unsorted' array. The smallest element is selected and swapped with the first element in the unsorted array.

Time Complexity:
Worst Case: O(N^2)
Best Case: O(N^2)