﻿1
00:00:00,420 --> 00:00:08,550
‫So now we're going to talk about unordered sets and we'll be using these in our adjacency list to store

2
00:00:08,550 --> 00:00:09,390
‫edges.

3
00:00:09,690 --> 00:00:15,420
‫So an unordered set is very similar to an unordered map.

4
00:00:15,780 --> 00:00:23,910
‫In an unordered map, we had key value pairs where these were the keys and these were the values.

5
00:00:24,330 --> 00:00:33,870
‫So an unordered set is just like this, except it doesn't have the values, it just has the keys.

6
00:00:34,260 --> 00:00:42,360
‫And just like with an unordered map, look up, insert and delete are all o of one.

7
00:00:42,570 --> 00:00:50,370
‫So that means that an unordered set is going to be more efficient than a vector from a big O perspective.

8
00:00:50,700 --> 00:00:58,770
‫But there is another benefit of an unordered set versus using a vector for storing our edges, and that

9
00:00:58,770 --> 00:01:00,180
‫is with a set.

10
00:01:00,180 --> 00:01:08,580
‫There are no duplicates, so we don't have to worry about duplicate edges being stored now with a set.

11
00:01:08,580 --> 00:01:14,580
‫We normally don't write it like this, we represent it like this.

12
00:01:14,970 --> 00:01:19,860
‫And that is our quick overview of unordered sets.

