Skip to content

Data Structure is a way to store and organize data so that it can be used efficiently. Data Structure such as Array, Pointer, Structure, Linked List, Stack, Queue, Graph, Searching, Sorting, Programs, etc.

Notifications You must be signed in to change notification settings

kaamrul/Data-Structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Data Structure

Searching

1. Linear Search (Java Coding or C Coding)

Algorithm

Step 1: set i = 0
Step 2: if i > n , go to step 7  // n = max size of an array
Step 3: if arr[i] = item , go to step 6  // item = founding value
Step 4: i = i + 1;
Step 5: go to step 2
Step 6: Print Item Found at Location arr[i]
Step 7: Print Item not Found
Step 8: Exit

2. Binary Search (Java Coding or C Coding)

Algorithm

Step 1: Set low = 0, high = n-1  // n, max size of an array
Step 2: mid = (low + high) / 2
Step 3: if item = array[mid]
		return mid;
Step 4: if item > array[mid]
		low = mid + 1
	else
		high = mid - 1
Step 5: Exit

Sorting

1. Bubble Sort (Java Coding or C Coding) && Optimize Bubble Sort (Java Coding or C Coding)

Algorithm

Step 1: Repeat steps 2 and 3 for i = 0 to n-1  // n, max size of an array
Step 2: Set j = 0 to n-1-i
Step 3: if Array[j] > Array[j+1]
		swap Array[j] and Array[j+1]

		temp = Array[j]
		Array[j] = Array[j+1]
		Array[j+1] = temp

Step 4: Exit

2. Insertion Sort ([Java Coding] or [C Coding])

 3. Selection Sort
 4. Merge Sort
 5. Quick Sort
 6. Radix Sort
 7. Shell Sort
 8. Heap Sort
 9. Bucket Sort
 10. Comb Sort
 11. Counting Sort
 12. Bitonic Sort
 13. Cocktail Sort
 14. Cycle Sort
 15. Tim Sort

Pattern Matching

About

Data Structure is a way to store and organize data so that it can be used efficiently. Data Structure such as Array, Pointer, Structure, Linked List, Stack, Queue, Graph, Searching, Sorting, Programs, etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published