https://www.youtube.com/watch?v=_xqIp2rj8bo
Lecture 11 of DSA Series : (Array Part 4) – Majority Element | Brute- Better-Best Approach | Moore’s Voting Algorithm – Pair Sum …
Unique youtube Information at youtube.152news.com
Cool Things About youtube Everyday
Lecture 11 of DSA Series : (Array Part 4) – Majority Element | Brute- Better-Best Approach | Moore’s Voting Algorithm – Pair Sum …
Class note and code provide please❤
❤❤sep15
14:58
Where is the link for DSA.
I AM UNABLE TO FIND
Lec 11 completed
Nice 🙂
16/09/24
where is dsa sheet link??
Thank you so so much for teaching DSA ❤❤❤❤❤❤
for the majority element we can also use hashmap..& nums) { mpp;n/2)
int majorityElement(vector
int n=nums.size();
map
for(int i=0;i
return nums[i];
}
return -1;
}
Keep uploading
16-9-2024
done
We can further optimize the sorting approch as the number appers more than n/2 times so it will always be at the n/2 index of the array so we can simply return the nums[n/2] there is no need to traverse tha array again
O(nlogn + n)
O(nlogn)
I know they both are same time complexity but it is more optimized
Code:
sort(nums.begin(),nums.end());
return nums[n/2];
Pin it so everyone can see it.
awasome series❤❤
Didi notes kab tak milega
DSA sheet link h he nhi Ma’m
Q)Find the pairsum from array = [3,4,7,8] with target =11?
ans: pairsum = (7,4) reason (shraddha=7 & aman= 4)😁
Lecture 11 completed
You have not given the link to the DSA sheet…
Wt if we have two pairs which is equal to target?
Ma’am golang par banao please