1
00:00:02,120 --> 00:00:09,680
You see in our mind map here that we're now in the sorting section and this big of an log-in, something

2
00:00:09,680 --> 00:00:15,110
we haven't talked about, is showing up, we'll get to that in this section.

3
00:00:15,950 --> 00:00:21,860
But I want to add a quick note here, looking at all these sorting algorithms and there's a lot more.

4
00:00:22,070 --> 00:00:29,150
It's important to note that you don't need to write a sorting algorithm from scratch, most likely ever

5
00:00:29,150 --> 00:00:29,870
in your career.

6
00:00:30,530 --> 00:00:32,690
Frameworks usually do that for us.

7
00:00:33,740 --> 00:00:39,200
But you do, however, need to know how they work, because while one you're most likely going to get

8
00:00:39,200 --> 00:00:44,050
asked in an interview, and two, because it makes you a better engineer.

9
00:00:44,540 --> 00:00:47,320
But this section is also about being efficient.

10
00:00:47,600 --> 00:00:53,060
You see, you can spend a lot of time on each one of these sections implementing your own and talking

11
00:00:53,060 --> 00:01:00,050
about it deeply, because I don't think I've ever heard of anybody actually having to implement in code

12
00:01:00,230 --> 00:01:02,540
manually the sorting algorithms.

13
00:01:02,660 --> 00:01:08,990
Most of the time you can just talk about it or the interviewer tells you that the array assorted and

14
00:01:08,990 --> 00:01:13,970
you need to know what to do with it, but implementing it from scratch, that doesn't really happen.

15
00:01:14,300 --> 00:01:18,920
But I've included it in this section because it's good to know how they work.

16
00:01:19,930 --> 00:01:25,090
And I'm not going to lie coding, sorting algorithms is not my favorite either.

17
00:01:25,420 --> 00:01:26,710
Don't let that deter you.

18
00:01:27,760 --> 00:01:34,240
I encourage you to watch the next couple of videos and even practice coding your own sorting algorithms

19
00:01:34,600 --> 00:01:36,370
because it will help your learning.

20
00:01:36,910 --> 00:01:42,280
But the main thing that we're going to get from this section is not how to implement these.

21
00:01:42,280 --> 00:01:46,270
I mean, we will do that, but the key is the trade off.

22
00:01:46,840 --> 00:01:50,730
You see, we have the big picture here that we definitely know about.

23
00:01:50,740 --> 00:01:51,070
Right.

24
00:01:51,430 --> 00:01:54,130
We talked about data structures and how there's tradeoffs.

25
00:01:55,000 --> 00:01:59,310
Well, when it comes to sorting, there's tradeoffs as well.

26
00:02:00,260 --> 00:02:05,690
You see how there is some time, complexity, trade offs, space complexity, trade offs, and it's

27
00:02:05,690 --> 00:02:09,410
important to know when to use what algorithm.

28
00:02:09,920 --> 00:02:11,540
That's our goal of this section.

29
00:02:12,020 --> 00:02:18,860
And before we get into our first sorting algorithm, I want to show you this nifty little tool that

30
00:02:18,860 --> 00:02:19,810
I'm going to link to.

31
00:02:20,120 --> 00:02:22,490
We have a few sorting algorithms.

32
00:02:22,670 --> 00:02:29,450
We have insertion sought selection, sort, bubble, sort shall merge heap and then two different variations

33
00:02:29,450 --> 00:02:30,350
of quicksort.

34
00:02:31,710 --> 00:02:34,450
And we also have different data sets.

35
00:02:35,100 --> 00:02:39,450
This is a random data set, see how they perform when I click here.

36
00:02:40,530 --> 00:02:42,510
Based on different sorting algorithm.

37
00:02:43,810 --> 00:02:45,940
See that they're all working and.

38
00:02:47,400 --> 00:02:52,920
All of them finish at different times, one is a lot slower than the other.

39
00:02:53,940 --> 00:02:55,380
What about nearly sorted?

40
00:02:56,490 --> 00:03:02,070
Again, one such as insertion, it is really, really fast, while others are slower.

41
00:03:03,520 --> 00:03:10,630
Reversed if the items are reversed and we need to sort a completely reversed list, again, different

42
00:03:10,630 --> 00:03:11,440
algorithms.

43
00:03:12,740 --> 00:03:14,090
Perform differently.

44
00:03:14,420 --> 00:03:18,690
It's never one that wins out over the other, depending on the inputs.

45
00:03:18,740 --> 00:03:20,750
What we need to do their.

46
00:03:22,380 --> 00:03:23,550
Different abilities.

47
00:03:25,570 --> 00:03:31,270
Let's start to learn about these different types of sorting algorithms so that by the end of these videos,

48
00:03:31,270 --> 00:03:35,760
we can make the right decision when to use what I'll see in the next one.
