Skip to content

Commit 8f1ca1f

Browse files
committed
Add day 31
1 parent b9a7e7c commit 8f1ca1f

File tree

8 files changed

+30
-1
lines changed

8 files changed

+30
-1
lines changed
File renamed without changes.

Diff for: day30/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![cover](./cover.png)
22

3-
# Day 29 - Search and Sort Algorithms Part C: Naive Pattern Search
3+
# Day 30 - Search and Sort Algorithms Part C: Naive Pattern Search
44

55
So this week is for searching and sorting algorithms, and we did linear search and binary search yesterday, and today's algorithm would be the Naive Search.
66

Diff for: day30/cover.png

-265 Bytes
Loading

Diff for: day30/ques.png

413 Bytes
Loading

Diff for: day31/JavaScript/bubblesort.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// to be added

Diff for: day31/README.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
![cover](./cover.png)
2+
3+
# Day 31 - Search and Sort Algorithms Part D: Bubble Sort
4+
5+
Now that we've seen some searching algorithms, it's time we proceed with the sorting algorithms. Whenever we look at sorting algorithm, the first algorithm that comes to mind is the easiest one, the bubble sort algorithm, and hence today, we'll be doing the bubble sort.
6+
7+
"Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order." -- (source: GeeksForGeeks)
8+
9+
## Question
10+
11+
Given an unsorted list of elements, write a program to sort the given list using bubble sort.
12+
13+
**Example**
14+
15+
```
16+
input: [1, 8, 3, 2, 9, 5, 4]
17+
output: [1, 2, 3, 4, 5, 8, 9]
18+
```
19+
20+
![ques](./ques.png)
21+
22+
## Solution
23+
24+
### [JavaScript Implementation](./JavaScript/binary.js)
25+
26+
```js
27+
to be added
28+
```

Diff for: day31/cover.png

136 KB
Loading

Diff for: day31/ques.png

1010 KB
Loading

0 commit comments

Comments
 (0)