정렬(2)
-
3.1. Sorting - 3.1.6 Merge Sort
CS - 3. Common Algorithms - 3.1. Sorting - 3.1.6 Merge Sort 💡Merge sort is a divide and conquer algorithm. It divides the input array into two halves, calls itself for the two halves, and then merges the two sorted halves. The merge() function is used for merging two halves. The merge(arr, l, m, r) is key process that assumes that arr[l..m] and arr[m+1..r] are sorted and merges the two sorted su..
2024.01.20 -
3.1. Sorting - 3.1.1 Bubble sort
CS - 3. Common Algorithms - 3.1. Sorting - 3.1.1 Bubble sort 💡Sorting algorithms are used to sort data in a collection. Sorting is a very common task in computer science, and it is also a very common interview question. There are many different ways to sort data, and different algorithms have different advantages and disadvantages. Learn about the sorting algorithms and know the best case/worst ..
2024.01.13