Skip to content

Commit 796a7c6

Browse files
committed
counting sort added
1 parent 178dca5 commit 796a7c6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ TODO: question14.c
1010
- merge sort using dynamic programming and hashmaps
1111
- duplicate elimination from an array
1212
- union, intersection and difference of two arrays
13+
- bucket sort
1314

1415

1516
### General Questions

arrays/question6.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ In each iteration one greatest element moves to its correct position.
66
It can be remembered as in each iteration the bubble(largest element) comes to the top (last in array)
77
88
Time Complexity:
9-
Best case: O(n)
10-
Worst case: O(n^2)
9+
Best case: O(n) -- already sorted just checking by looping once or for value very less than n
10+
Worst case: O(n^2) -- nested loop
1111
1212
Space Complexity:
1313
O(1)

0 commit comments

Comments
 (0)