hyunkookim 님의 블로그

  • 홈
  • 태그
  • 방명록

MST 2

[최소신장트리 MST] Prim's minimum spanning tree

Prim's AlgorithmSolved HardImplement Prim's minimum spanning tree algorithm.A Minimum Spanning Tree (MST) is a tree that spans all the vertices in a given weighted, undirected graph while minimizing the total edge weight and avoiding cycles. It connects all nodes with exactly ∣V∣−1∣V∣−1 edges, where VV is the set of vertices, and has the lowest possible sum of edge weights.Prim's algorithm is a ..

LeetCode/NeetCode 2025.04.11

최소 신장 트리(Prim's, MST: Minimum spanning Tree)

✅ 1. 최소 신장 트리(Minimum Spanning Tree)란?정의: 주어진 무방향 연결 그래프에서 모든 정점들을 연결하면서 가중치의 합이 최소가 되는 트리 구조의 부분 그래프.조건모든 정점이 연결되어 있어야 함.사이클(순환)은 없어야 함.여러 개의 MST가 존재할 수도 있음.📌 기본 개념Undirected Graph (무방향 그래프)모든 노드가 연결되도록 (Connected)전체 간선의 가중치 합이 최소가 되도록 (Minimum Total Cost)노드가 n개라면 MST는 항상 n - 1개의 간선만 포함→ 그래서 사이클이 생기지 않음어느 노드에서 시작해도 결과는 동일한 MST 완성 가능✅ 2. Prim's Algorithm이란? (프림 알고리즘)핵심 아이디어: 하나의 정점에서 시작해서, 가장 작..

Coding Test/알고리즘 이론 2025.04.11
이전
1
다음
더보기
프로필사진

hyunkookim 님의 블로그

hyunkookim 님의 블로그 입니다.

  • 분류 전체보기 (457)
    • 개인 연구 (0)
    • job 인터뷰 (34)
      • 2025년 1분기 USA (2)
      • 코테(Amazon) 준비 (5)
      • 코테(Matroid) 준비 (27)
      • 코테 문제 (0)
    • 세팅 (7)
      • ubuntu (7)
    • 코드 형상 관리 (2)
      • git (2)
    • Coding Test (72)
      • 알고리즘 이론 (70)
      • Machine Learning (NeetCode) (2)
    • HackerRank (1)
      • 공통 (1)
    • CodeSignal (1)
      • 문제 은행 (1)
    • LeetCode (329)
      • 공통 (7)
      • Grind169 (60)
      • NeetCode (98)
      • Top Interview 150 (68)
      • LeetCode75 (34)
      • DP심화 (38)
      • 주제별 보충 (23)
      • [Weekly Contest] (0)
    • Deep Learning (4)
      • 3D 재구성 (0)
      • 장면 스타일 변환 (2)
      • 물체 인지 & 추적 (0)
      • 렌더링AI (2)
    • 일단 리스트업 (6)
      • 딥러닝 (2)
      • 코딩 테스트 (2)
      • 기타 (2)

Tag

오블완, 티스토리챌린지, Backtracking, array / string, neetcode, Two pointers, BST, dp, 누적합, top150, 우선순위큐, dfs, LeetCode, tree, heap, neetcode150, BFS, 슬라이딩윈도우, Coding Test, leetcode75,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2026/02   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

방문자수Total

  • Today :
  • Yesterday :

Copyright © AXZ Corp. All rights reserved.

티스토리툴바