링할 수 있다. 그래프의 간선은 방향이 있거나 없을 수 있고, 간선은 숫자 가중치를 저장할 수
있다. 그래프가 주어지면 자연스럽게 여러 흥미로운 질문들이 생긴다.
●
그래프가 연결되어 있는가? 깊이 우선 탐색을 사용해 그래프 내 모든 노드가 방문되었는지 확인해보자.
●
유향 그래프는 순환을 포함할 수 있는가? 깊이 우선 탐색을 사용해 순환 유무를 검출하기 위해 탐색하
는 동안 추가 상태를 관리해보자.
●
그래프의 두 노드
u
와
v
가 주어지면, 포함하는 간선 개수 측면에서
u
에서
v
까지의 최단 경로는 무엇일
까? 너비 우선 탐색을 사용해 문제를 해결해보자.
●
가중 그래프와 시작 노드 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.
O’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
I wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
I’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
I'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.