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
- Host: GitHub
- URL: https://github.com/blesson-tomy/s3_data_structures_lab
- Owner: Blesson-Tomy
- Created: 2023-10-18T18:15:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-22T17:03:38.000Z (11 months ago)
- Last Synced: 2025-01-27T23:38:28.622Z (4 months ago)
- Topics: c, datastructures, linkedlist, sorting
- Language: C
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)