1
00:00:02,400 --> 00:00:04,100
So let's start with the what

2
00:00:04,110 --> 00:00:07,240
and there I want to start with algorithm,

3
00:00:07,240 --> 00:00:10,600
an algorithm is not that hard to understand.

4
00:00:10,770 --> 00:00:17,280
Often in programming, you have a certain problem where you have some inputs and you want to get to a

5
00:00:17,280 --> 00:00:18,800
certain output.

6
00:00:18,870 --> 00:00:24,390
So let's say you have an array of numbers as an input, 2, 1, 3 in this case

7
00:00:24,390 --> 00:00:29,670
and now let's say our goal here for a given problem, for the application we're writing, for a part of

8
00:00:29,670 --> 00:00:33,840
that application is to find the minimum number in that array,

9
00:00:33,840 --> 00:00:40,020
so in this scenario here, that would be the number one, we want to find that minimum number.

10
00:00:40,020 --> 00:00:46,440
Now how do we get there? Which code do we need to write to get the minimum number out of this array of

11
00:00:46,440 --> 00:00:47,350
numbers?

12
00:00:47,430 --> 00:00:55,070
That is the algorithm, the sequence of steps we need there to derive this desired output for the given

13
00:00:55,070 --> 00:00:56,010
input,

14
00:00:56,010 --> 00:01:02,610
so for the algorithm we expect an input of a certain format and that format should always be the same

15
00:01:02,760 --> 00:01:05,210
and we know what we want to get as an output,

16
00:01:05,280 --> 00:01:11,520
so the minimum number in this case and then it's up to us to come up with a number of steps that help

17
00:01:11,520 --> 00:01:14,470
us get there, that help us find a solution here.

18
00:01:14,550 --> 00:01:16,530
That is what we would call an algorithm,

19
00:01:16,620 --> 00:01:22,800
that sequence of steps that gives us for a given input a certain desired output.

20
00:01:22,800 --> 00:01:28,430
And here we also see a data structure in action by the way, this array is a data structure,

21
00:01:28,440 --> 00:01:34,260
of course one that is built into Javascript and built into most programming languages actually

22
00:01:34,260 --> 00:01:36,750
but still it is a data structure,

23
00:01:36,750 --> 00:01:40,380
it's a piece of data which also follows certain rules,

24
00:01:40,380 --> 00:01:46,920
in the case of an array, an ordered list of data where every item has an index and we can work with that

25
00:01:46,920 --> 00:01:49,790
data structure to solve a certain problem.

26
00:01:49,800 --> 00:01:56,190
So here we see both important concepts on one simple slide, the data structure is something like an array

27
00:01:56,280 --> 00:02:03,080
or an object or also maps and sets and the algorithm is a sequence of steps to solve a problem,

28
00:02:03,150 --> 00:02:06,420
that is what this module is about in the end.

29
00:02:06,420 --> 00:02:08,550
Now why would you care about this?

30
00:02:08,550 --> 00:02:16,020
Well if you're working on more complex projects or more complex programs, you might need more sophisticated

31
00:02:16,050 --> 00:02:20,670
data storage solutions or computation logic to solve certain problems,

32
00:02:20,790 --> 00:02:25,680
so you simply need to solve certain problems all the time in programming.

33
00:02:25,680 --> 00:02:31,770
If you're working on something, no matter how complex it is, you typically have certain problems you need

34
00:02:31,770 --> 00:02:35,460
to solve to make sure that your program does what it should do,

35
00:02:35,520 --> 00:02:42,540
so to make sure that your application as a whole behaves correctly and that involves a ton of simple

36
00:02:42,540 --> 00:02:47,940
problems where you might not need to think much about it but even such simple problems would technically

37
00:02:47,940 --> 00:02:54,450
be algorithms of course but you might also have some more complex issues, more complex tasks you need

38
00:02:54,450 --> 00:03:01,530
to solve and in order to solve them, you need to know how to think logically, you need to be able to solve

39
00:03:01,530 --> 00:03:07,740
problems as a programmer and understanding algorithms and how to derive them and how to compare different

40
00:03:07,740 --> 00:03:09,420
solutions against each other,

41
00:03:09,510 --> 00:03:12,120
that is therefore a crucial thing

42
00:03:12,120 --> 00:03:18,090
as a developer. You need to be able to do that so that you can solve any problem and you can write good

43
00:03:18,090 --> 00:03:26,070
code and in the end also, get hired because being able to solve problems when being provided with them

44
00:03:26,070 --> 00:03:32,580
in an interview is something recruiters are looking for. Often in a job interview, you will be presented

45
00:03:32,580 --> 00:03:33,870
with a certain problem,

46
00:03:33,870 --> 00:03:40,260
so with some input data and a desired output and you need to describe and derive how to get there,

47
00:03:40,290 --> 00:03:45,960
so you need to build and describe an algorithm whilst you're in a job interview.

48
00:03:45,960 --> 00:03:51,330
That is a common task and even if you wouldn't care about the other parts, though you really should try

49
00:03:51,330 --> 00:03:53,320
to become a problem solver

50
00:03:53,340 --> 00:03:59,880
but even if you wouldn't care about that, even if you just want to ace job interviews, you need to understand

51
00:03:59,910 --> 00:04:05,660
this algorithm thing and how to derive your own algorithms and think about all of that.

52
00:04:05,670 --> 00:04:09,810
So this is what this module is about and why you should care

53
00:04:09,810 --> 00:04:16,010
and with that I'd say let's dive right in and let's build our first own algorithm, maybe this algorithm

54
00:04:16,020 --> 00:04:20,610
here so that we get a feeling for how that works and which steps it involves.
