Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coddy

Prim's Algorithm - Graph Algorithms

via Coddy

Overview

Master Prim's Algorithm for Minimum Spanning Trees: grow one tree from a start vertex by always adding the cheapest crossing edge. Build it in your language of choice and answer bottleneck-edge and connectivity queries, the counterpart to Kruskal.

Prerequisites:

  • Knowledge of a programming language of your choice.
  • Basic understanding of weighted graphs.
  • Helpful: the Kruskal course (the other MST algorithm).

Syllabus

Introduction

  • Motivation

The Algorithm

  • How it works?
  • Pseudo Code
  • Implementation (Part 1)
  • Implementation (Part 2)
  • Time and Space Complexity

Final Challenges

  • Final Challenge #1
  • Final Challenge #2

Reviews

Start your review of Prim's Algorithm - Graph Algorithms

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.