Byte-Sized-Chunks: Graph Algorithms and Problems in Java
4.7 (10 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,560 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Byte-Sized-Chunks: Graph Algorithms and Problems in Java to your Wishlist.

Add to Wishlist

Byte-Sized-Chunks: Graph Algorithms and Problems in Java

Djisktra, Prim, Kruskal, Bellman-Ford, the topological sort - all will make sense now!
4.7 (10 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
1,560 students enrolled
Created by Loony Corn
Last updated 3/2016
English
Current price: $10 Original price: $20 Discount: 50% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 5 hours on-demand video
  • 49 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Design and implement software using canonical graph algorithms - Djikstra, Prim, Kruskal, Bellman Ford and topological sort
  • Understand the use-cases for the common graph algorithm
View Curriculum
Requirements
  • Basic knowledge of programming is assumed, preferably in Java
Description

Note: This course is a subset of our much longer course 'From 0 to 1: Data Structures & Algorithms' so please don't sign up for both:-)

This is an animated, visual and spatial way to learn data structures and algorithms

  • Our brains process different types of information differently - evolutionarily we are wired to absorb information best when it is visual and spatial i.e. when we can close our eyes and see it
  • More than most other concepts, Data Structures and Algorithms are best learnt visually. These are incredibly easy to learn visually, very hard to understand most other ways
  • This course has been put together by a team with tons of everyday experience in thinking about these concepts and using them at work at Google, Microsoft and Flipkart

Taught by a Stanford-educated ex-Googler.

The graph is a data structure that is used to model a very large number of real world problems. It's also an programming interview favorite. The study of graphs and algorithms associated with graphs forms an entire field of study called graph theory.

  • Directed and undirected graphs
  • Adjacency matrices, lists and sets
  • Breadth and Depth-First traversal
  • Topological sort
  • Djikstra's algorithm
  • Bellman-Ford algorithm
  • Prim's algorithm
  • Kruskal's algorithm


Using discussion forums

Please use the discussion forums on this course to engage with other students and to help each other out. Unfortunately, much as we would like to, it is not possible for us at Loonycorn to respond to individual questions from students:-(

We're super small and self-funded with only 2 people developing technical video content. Our mission is to make high-quality courses available at super low prices.

The only way to keep our prices this low is to *NOT offer additional technical support over email or in-person*. The truth is, direct support is hugely expensive and just does not scale.

We understand that this is not ideal and that a lot of students might benefit from this additional support. Hiring resources for additional support would make our offering much more expensive, thus defeating our original purpose.

It is a hard trade-off.

Thank you for your patience and understanding!

Who is the target audience?
  • Nope! Please don't enroll for this class if you have already enrolled for our 15-hour course 'From 0 to 1: Data Structures and Algorithms'
  • Yep! Computer Science and Engineering grads who are looking to really visualise data structures, and internalise how they work
  • Yep! Experienced software engineers who are looking to refresh important fundamental concepts
  • Yep! MBA graduates or business professionals who are looking to move to a heavily quantitative role
Students Who Viewed This Course Also Viewed
Curriculum For This Course
28 Lectures
05:13:18
+
Its A Connected World!
9 Lectures 01:45:15

The graph is a data structure that is used to model a very large number of real world problems. It's also an programming interview favorite. The study of graphs and algorithms associated with graphs forms an entire field of study called graph theory.
Preview 15:40

Edges in a graph can be directed or undirected. A graph with directed edges forms a Directed Graph and those with undirected edges forms an Undirected Graph. These edges can be likened to one-way and two-way streets.
Types Of Graphs
07:21

Different relationships can be modeled using either Directed or Undirected graphs. When a graph has no cycles it's called an acyclic graph. A graph with no cycles is basically a tree.
The Directed And Undirected Graph
14:29

There are a number of different ways in which graphs can be implemented. However they all follow they same basic graph interface. The graph interface allows building up a graph by adding edges and traversing a graph by giving access to all adjacent vertices of any vertex.

Representing A Graph In Code
08:09

An adjacency matrix is one way in which a graph can be represented. The graph vertices are rows and columns of the matrix and the cell value shows the relationship between the vertices of a graph.
Graph Using An Adjacency Matrix
15:25

The adjacency list and the adjacency set are alternate ways to represent a graph. Here the connection between the vertices is represented using either a linked list or a set.
Graph Using An Adjacency List And Adjacency Set
17:53

Compare the adjacency matrix, adjacency list and the adjacency set in terms of space and time complexity of common operations

Comparison Of Graph Representations
10:08

Common traversal methods of trees apply to graphs as well. There is an additional wrinkle with graphs, dealing with cycles and with unconnected graphs. Otherwise the algorithms are exactly the same as those we use to traverse trees.

Graph Traversal - Depth First And Breadth First
14:56
+
Graph Algorithms
2 Lectures 24:26
Topological sort is an ordering of vertices in a graph where a vertex comes before every other vertex to which it has outgoing edges? A mouthful? This lecture will make things easy to follow. Topological sort is widely used in real world problems.
Topological Sort In A Graph
17:30

Here is the code in Java to implement topological sort.
Implementation Of Topological Sort
06:56
+
Shortest Path Algorithms
11 Lectures 01:52:29
Graphs with simple edges (directed or undirected) are unweighted graphs. The distance table is an important data structure used to find the shortest path between any two vertices on a graph. This is used in almost every shortest path algorithm.
Introduction To Shortest Path In An Unweighted Graph - The Distance Table
12:38

Visualize the shortest path algorithm using the distance table, step by step.
The Shortest Path Algorithm Visualized
14:15

Shortest path implementation in Java.
Implementation Of The Shortest Path In An Unweighted Graph
06:19

So far we only deal with unweighted graphs. Graphs whose edges have a weight associated are widely used to model real world problems (traffic, length of path etc).

Introduction To The Weighted Graph
03:29

A greedy algorithm is one which tries to find the local optimum by looking at what is the next best step at every iteration. It does not look at the overall picture. It's best used for optimization problems where the solution is very hard and we want an approximate answer.

Finding the shortest path in a weighted graph is a greedy algorithm.

Shortest Path In A Weighted Graph - A Greedy Algorithm
18:47

Dijkstra's algorithm is a greedy algorithm to find the shortest path in a weighted graph.
Dijkstra's Algorithm Visualized
14:14

The implementation of Dijkstra's algorithm in Java.

Implementation Of Dijkstra's Algorithm
08:15

A weighted graph can have edge weights which are negative. Dealing with negative weights have some quirks which are dealt with using the Bellman Ford algorithm.

Introduction To The Bellman Ford Algorithm
08:40

Visualize how the Bellman Ford works to find the shortest path in a graph with negative weighted edges.
The Bellman Ford Algorithm Visualized
11:22

If a graph has a negative cycle then it's impossible to find a shortest path as every round of the cycle makes the path shorter!

Dealing With Negative Cycles In The Bellman Ford Algorithm
07:36

Implementation Of The Bellman Ford Algorithm
06:54
+
Spanning Tree Algorithms
4 Lectures 43:36
A minimal spanning tree is a tree which covers all the vertices of of the graph and has the lowest cost. Prim's algorithm is very similar to Dijkstra's shortest path algorithm with a few differences.
Prim's Algorithm For a Minimal Spanning Tree
17:27

The minimal spanning tree is used when we want to connect all vertices at the lowest cost, it's not the shortest path from source to destination.

Let's see how we implement Prim's algorithm in Java.

Use Cases And Implementation Of Prim's Algorithm
09:52

Kruskal's algorithm is another greedy algorithm to find a minimal spanning tree.
Kruskal's Algorithm For a Minimal Spanning Tree
08:43

Implementation Of Kruskal's Algorithm
07:34
+
Graph Problems
2 Lectures 27:32
Given a course list and pre-reqs for every course design a course schedule so pre-reqs are done before the courses.
Design A Course Schedule Considering Pre-reqs For Courses
13:01

Find the shortest path in a weighted graph where the number of edges also determine which path is shorter.
Find The Shortest Path In A Weighted Graphs - Fewer Edges Better
14:31
About the Instructor
Loony Corn
4.3 Average rating
5,034 Reviews
39,127 Students
77 Courses
An ex-Google, Stanford and Flipkart team

Loonycorn is us, Janani Ravi and Vitthal Srinivasan. Between us, we have studied at Stanford, been admitted to IIM Ahmedabad and have spent years  working in tech, in the Bay Area, New York, Singapore and Bangalore.

Janani: 7 years at Google (New York, Singapore); Studied at Stanford; also worked at Flipkart and Microsoft

Vitthal: Also Google (Singapore) and studied at Stanford; Flipkart, Credit Suisse and INSEAD too

We think we might have hit upon a neat way of teaching complicated tech courses in a funny, practical, engaging way, which is why we are so excited to be here on Udemy!

We hope you will try our offerings, and think you'll like them :-)