﻿1
00:00:00,410 --> 00:00:06,350
‫So now we're going to do our introduction to depth first search post order and I'm going to bring up

2
00:00:06,350 --> 00:00:07,220
‫a tree.

3
00:00:07,550 --> 00:00:15,410
‫So the difference between preorder post order and in order is just the order that the values get output

4
00:00:15,410 --> 00:00:16,550
‫to the screen.

5
00:00:16,940 --> 00:00:22,420
‫So with post order, we're going to start at the root, but we don't print out the value.

6
00:00:22,430 --> 00:00:30,020
‫We just visit the node, then we go to the left and visit the 21 node and go to the left again and visit

7
00:00:30,020 --> 00:00:31,580
‫the 18 node.

8
00:00:31,700 --> 00:00:34,770
‫And then the 18 node is going to look left.

9
00:00:34,790 --> 00:00:36,080
‫It's going to look right.

10
00:00:36,080 --> 00:00:38,330
‫And then finally it's going to print its value.

11
00:00:38,330 --> 00:00:40,520
‫So I'll color that in orange.

12
00:00:40,700 --> 00:00:43,160
‫And then we come back up to the 21 node.

13
00:00:43,160 --> 00:00:44,510
‫It's gone left now.

14
00:00:44,510 --> 00:00:47,570
‫It's going to go right to the 27 node.

15
00:00:47,780 --> 00:00:52,550
‫The 27 node is going to look left, look right, and then print out its value.

16
00:00:52,850 --> 00:00:55,300
‫Then we'll come back up to the 21 node.

17
00:00:55,310 --> 00:00:56,240
‫It's gone, left.

18
00:00:56,240 --> 00:00:57,620
‫It has gone right now.

19
00:00:57,620 --> 00:00:59,480
‫It can print its value.

20
00:00:59,690 --> 00:01:02,720
‫So now we come back up to the 47 node.

21
00:01:02,750 --> 00:01:03,860
‫It's gone left.

22
00:01:03,860 --> 00:01:07,460
‫Now it's going to go right to the 76 node.

23
00:01:07,820 --> 00:01:14,570
‫The 76 node will go left and the 52 will look left and then right and then print its value.

24
00:01:14,870 --> 00:01:16,820
‫We come up to the 76.

25
00:01:16,850 --> 00:01:18,740
‫It goes right to the 82.

26
00:01:18,770 --> 00:01:22,250
‫It's going to look left, look right, and then print its value.

27
00:01:22,490 --> 00:01:25,070
‫Then we come back up to the 76.

28
00:01:25,100 --> 00:01:28,760
‫It has gone left and right and now it will print its value.

29
00:01:29,030 --> 00:01:31,160
‫Then we come back up to the 47.

30
00:01:31,160 --> 00:01:32,210
‫It has gone left.

31
00:01:32,210 --> 00:01:33,200
‫It has gone right.

32
00:01:33,200 --> 00:01:35,810
‫And now it will print its value.

33
00:01:36,320 --> 00:01:39,650
‫So we will code this in the next video.

34
00:01:39,950 --> 00:01:43,040
‫But for now, that's our introduction to depth.

35
00:01:43,040 --> 00:01:45,200
‫First Search Post Order.

