전체 글(302)
-
3.1. Sorting - 3.1.2 Selection Sort
CS - 3. Common Algorithms - 3.1. Sorting - 3.1.2 Selection Sort 💡 Selection sort is a sorting algorithm that selects the smallest unsorted item in the list and swaps it with index 0, then finds the next smallest and places it into index 1 and so on. 선택 정렬은 목록에서 정렬되지 않은 가장 작은 항목을 선택하여 인덱스 0으로 바꾼 다음 다음으로 작은 항목을 찾아서 인덱스 1에 배치하는 정렬 알고리즘입니다. 선택 정렬(Selection Sort)은 이름에서 알 수 있듯이, 가장 적은 값을 선택하여 앞으로 옮기는 ..
2024.01.14 -
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 -
CS - 2. Asymptotic Notation (점근 표기법)
2. Asymptotic Notation (점근 표기법) 💡The efficiency of an algorithm depends on the amount of time, storage and other resources required to execute the algorithm. The efficiency is measured with the help of asymptotic notations. An algorithm may not have the same performance for different types of inputs. With the increase in the input size, the performance will change. The study of change in perform..
2024.01.13 -
Data structures (with python) - 8.Tree - 8.6 Unbalanced Tree
Data structures (with python) - 8.Tree - 8.5 Unbalanced Tree An unbalanced binary tree is one that is not balanced. 데이터 구조에서 트리는 노드들이 계층적으로 연결된 구조를 말합니다. 저번 장에서 말한 균형 트리(Balanced Tree)는 모든 노드에서 왼쪽 서브트리와 오른쪽 서브트리의 높이 차이가 일정한 범위 내에 있는 트리를 말합니다. 이번에 살펴볼 불균형 트리(Unbalanced Tree)는 이런 조건을 만족하지 않는 트리를 의미합니다. 예를 들어, 이진 탐색 트리(Binary Search Tree, BST)는 모든 노드에서 왼쪽 서브트리에 있는 노드들의 값이 해당 노드의 값보다 작고, 오른쪽 서브트리에 있..
2024.01.13 -
Data structures (with python) - 8.Tree - 8.5 Balanced Tree
Data structures (with python) - 8.Tree - 8.5 Balanced Tree 💡 A balanced binary tree, also referred to as a height-balanced binary tree, is defined as a binary tree in which the height of the left and right subtree of any node differ by not more than 1. 높이-균형 이진 트리라고도 하는 균형 이진 트리는 모든 노드의 왼쪽과 오른쪽 하위 트리의 높이가 1 이하로 차이가 나는 이진 트리로 정의됩니다. 균형트리(Balanced Tree)에 대해 알아봅시다. 균형 트리는 모든 노드의 왼쪽 서브트리와 오른쪽 서브트리의 ..
2024.01.11 -
Data structures (with python) - 8.Tree - 8.4 Complete Binary Tree
Data structures (with python) - 8.Tree - 8.4 Complete Binary Tree 💡 A complete binary tree is a special type of binary tree where all the levels of the tree are filled completely except the lowest level nodes which are filled from as left as possible. 완전 이진 트리는 가능한 한 왼쪽부터 채워지는 최하위 레벨 노드를 제외하고 트리의 모든 레벨이 완전히 채워지는 특수한 유형의 이진 트리입니다. Full Binary Tree 와 Complete Binary Tree 의 한글 번역에 조금 주의를 해야하는데, 개인적..
2024.01.11