자바스크립트로 min heap을 구현하는 class를 만들어 보고 프로그래머스 문제 더 맵게를 풀기Lv0 ~ Lv1을 풀다 우선순위 큐 자료 구조를 활용한 문제가 나오면 기본 자료구조와 알고리즘 지식이 필요합니다.큐의 자료구조는 알다시피 스택과 반대로 FIFO를 가지
그래프 + 우선순위 큐를 복합한 탐색 알고리즘모든 정점들을 가장 적은 비용으로 연결하기 위해 사용된다.그리디 알고리즘의 일종이다.1 2차원 배열이 주어지고 배열의 0번째는 현재 노드, 1번째는 현재노드와 연결할 수 있는 노드, 2번째는 현재노드와 연결할 노드의 간선을
Priority Queue(우선순위 큐)를 min heap으로 구현프로그래머스 문제 더 맵게 풀기(1)포스팅에 이어집니다.InputScoville : 숫자로 된 배열K : 스코빌 지수의 최소 값Condition섞은 음식의 Scoville = 가장 작은 Scoville
vertex 와 edge 로 이루어진 집합그림을 참고하여 동그라미(정점)는 vertex, 선(간선)은 edge로 볼 수 있다.트리 구조에 비해 방향성을 가지고 있다(트리는 단방향 그래프의 특징을 가지고있다고 볼 수 있다)예시) 지도 네비게이션, 인스타그램 친구 관계,