00:01
Number of occurrences of four in a given list.
00:03
So here's something very easy to do.
00:05
And i'm just going to make a very simple helper function.
00:11
So i'm just going to count the number.
00:12
And i'm going to pass in, this is going to be an array here.
00:15
So we're going to put, sorry, list.
00:21
Perfect.
00:26
Right.
00:28
I'm sorry, this is going to be nums.
00:29
Ok, perfect.
00:31
From here, we want to have a count equal to zero.
00:33
So we want to initialize a count of zero in case there are zero counts.
00:37
And we're going to iterate for the num in nums if num, sorry, we don't even have to, yeah.
00:44
If num is equal to four, we're going to increment the count by one.
00:48
And then else, and then we're going to iterate the count by one.
00:53
And then we're just going to return count at the very end...