전체 글(302)
-
Data structures (with python) - 4. Linked List
Data structures (with python) - 4. Linked List 💡 Arrays store elements in contiguous memory locations, resulting in easily calculable addresses for the elements stored and this allows faster access to an element at a specific index. Linked lists are less rigid in their storage structure and elements are usually not stored in contiguous locations, hence they need to be stored with additional tags..
2024.01.06 -
Data structures (with python) - 3. Heap
Data structures (with python) - 3. Heap 💡 Heap is a tree-based data structure that follows the properties of a complete binary tree and is either a Min Heap or a Max Heap. 힙은 완전한 이진 트리의 속성을 따르는 트리 기반 데이터 구조로, 최소 힙 또는 최대 힙 중 하나입니다. 힙(Heap)은 이진트리의 일종으로, 특정한 규칙을 가지고 있는 자료 구조이다. (Tree 는 이진트리, 밸런스 트리, 언밸런스 트리 등등을 차후 다룬다.) 힙은 두가지 종류가 있습니다. 최대 힙(Max heap) , 최소 힙(Min Heap) 최대 힙 : 부모 노드의 키 값이 자식 노드의 키 값보..
2024.01.05 -
Data structures (with python) - 2. Graph - 2.4. Graph Representation
Data structures (with python) - 2. Graph - 2.4. Graph Representation 💡 A graph can either be represented as an adjacency matrix or an adjacency list. The adjacency matrix is a 2D array of size V x V where V is the number of vertices in a graph. Let the 2D array be adj[][], a slot adj[i][j] = 1 indicates that there is an edge from vertex i to vertex j. Adjacency list is an array of vectors. Size ..
2024.01.04 -
Data structures (with python) - 2. Graph - 2.3. Spanning Tree
Data structures (with python) - 2. Graph - 2.3. Spanning Tree Spanning Tree 💡 A spanning tree is a subset of Graph G, which has all the vertices covered with minimum possible number of edges. Hence, a spanning tree does not have cycles and it cannot be disconnected.. 스패닝 트리는 그래프 G의 하위 집합으로, 모든 정점이 가능한 최소 수의 에지로 덮여 있습니다. 따라서 스패닝 트리에는 주기가 없으며 연결이 끊어질 수 없습니다. Spanning Tree 는 뒤에 Tree 라고 붙지만 구지 분류하자면..
2024.01.03 -
Data structures (with python) - 2. Graph - 2.2. Undirected graph
Data structures (with python) - 2. Graph - 2.2. Undirected graph 💡 An undirected graph is graph, i.e., a set of objects (called vertices or nodes) that are connected together, where all the edges are bidirectional. An undirected graph is sometimes called an undirected network. In contrast, a graph where the edges point in a direction is called a directed graph. 방향성 없는 그래프는 그래프, 즉 모든 가장자리가 양방향인 객..
2024.01.02 -
Data structures (with python) - 2. Graph - 2.1. Directed graph
Data structures (with python) - 2. Graph - 2.1. Directed graph 💡 A directed graph is graph, i.e., a set of objects (called vertices or nodes) that are connected together, where all the edges are directed from one vertex to another. A directed graph is sometimes called a digraph or a directed network. In contrast, a graph where the edges are bidirectional is called an undirected graph. 방향성 그래프는 서..
2024.01.01