- Create
todo-api
folder - Add or copy
package.json
file - create
src
foler insidetodo-api
folder - create
server.js
andTodo.js
file insidesrc
folder - And run
npm install
in the root directory i.e.todo-api
- run
npm start
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bubble sort algorithm | |
def bubbleSort(dataset): | |
# TODO: start with the array length and decrement each time | |
for i in range(len(dataset) -1, 0, -1): | |
for j in range(i): | |
if dataset[j] > dataset [j+1]: | |
temp = dataset[j] | |
dataset[j] = dataset[j+1] | |
dataset[j+1] = temp |