sort(3)
-
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.5 Quick Sort
CS - 3. Common Algorithms - 3.1. Sorting - 3.1.5 Quick Sort 💡Quick Sort is a divide and conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. There are many different versions of quickSort that pick pivot in different ways. 퀵 정렬은 분할 및 정복 알고리즘입니다. 이 알고리즘은 요소를 피벗으로 선택하고 선택된 피벗을 중심으로 주어진 배열을 분할합니다. 다양한 방식으로 피벗을 선택하는 여러 가지 버전의 퀵 정렬이 있습니다. 퀵정렬(Quick S..
2024.01.16 -
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