Welcome back.
Now, in this video, we're going to implement the logic that we talked about in the previous video
to solve the contains duplicates problem.
Now, start with defining our map.
So it would be something like this or a dictionary, and then we do a loop over our list.
And first thing you need to do really is just check check to see if the current element in the loop
current integer that we are on in our loop in our list is actually in our dictionary.
Now, if that's the case, then we just return to.
That's not the case then we just need to indicate that we have seen this element just now, so we would
do so by just simply incrementing the value that corresponds to that element.
But one such that when we do another iteration and we actually see this element, we would find that
it exists in our map.
So we would return.
True.
So this condition basically is responsible for checking to see if we've already seen this element before.
Basically, that's why we have the map for.
And if we have it, which are true, then we'll look just return false now or course we need to import
the people that were here and then we should be good to go.
OK, so now let's try to submit the code to decode ignore the runtime error I had earlier and perfect
it works.
Now, as always, you'll find the full code that we wrote in the resources alongside the programming,
and also if you have any questions, feel free to reach me in the Q&A session.
I'll see you in the next video.