Majority Element II | Brute-Better-Optimal

take U forward
take U forward
151.3 هزار بار بازدید - پارسال - Problem Link:
Problem Link: https://bit.ly/3vIsCTH

Notes/C++/Java/Python codes: https://takeuforward.org/data-structu...

We have solved the problem, and we have gone from brute force and ended with the most optimal solution. Every approach's code has been written in the video itself. Also, we have covered the algorithm with intuition.

Full Course: https://bit.ly/tufA2ZYt

You can follow me across social media, all my handles are below:

Linkedin/Instagram/Telegram: https://linktr.ee/takeUforward

0:00 Introduction of Course
01:12  Problem Statement
02:02  Observation
03:46  Brute force using Looping
05:32  Pseudocode
07:25  Complexity
07:59  Better approach using Hashing
11:49  Pseudocode
13:08  Complexity
14:39  Optimal approach n/2 times (Extended Boyer Moore’s Voting Algorithm)
14:54  Code
15:10  Intuition for n/3 times
19:14  Dry run
22:37  Code
25:47  Complexity
پارسال در تاریخ 1402/01/25 منتشر شده است.
151,371 بـار بازدید شده
... بیشتر