Data structure2 [Javascript] var, let, const var, let, const *hoisting? gmlwjd9405.github.io/2019/04/22/javascript-hoisting.html yuddomack.tistory.com/entry/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-%ED%98%B8%EC%9D%B4%EC%8A%A4%ED%8C%85Hoisting var, let, const gist.github.com/LeoHeo/7c2a2a6dbcf80becaaa1e61e90091e5d happycording.tistory.com/entry/let-const-%EB%9E%80-%EC%99%9C-%EC%8D%A8%EC%95%BC%EB%A7%8C-%ED%95%98%EB%8A%94%EA%B0%.. 2021. 1. 18. CS50 Week 3 Linear search Binary search Bubble sort Selection sort Insertion sort Recursion Merge sort Bubble Sort def bubblesort(data): for index in range(len(data) - 1): for index2 in range(len(data) - index - 1): if data[index2] > data[index2 + 1]: data[index2], data[index2 + 1] = data[index2 + 1], data[index2] return data 반복문이 두 개 O(n2) 최악의 경우, n∗(n−1)2 완전 정렬이 되어 있는 상태라면 최선은 O(n) Selection Sort def sele.. 2020. 7. 27. 이전 1 다음