Top K Frequent Elements | leetcode 347 | Hindi

  Рет қаралды 6,534

Codebix

Codebix

Күн бұрын

liked this video? Click here / @codebix1096
join out facebook group :- / 258049468776636
problem :- leetcode.com/p...
code :- github.com/luc...

Пікірлер: 40
@RishabhVerma
@RishabhVerma 4 жыл бұрын
No one ever made the explanation this easy. Thanks Sir
@codebix1096
@codebix1096 4 жыл бұрын
You are most welcome
@sonurathod9551
@sonurathod9551 11 ай бұрын
hi you have a really good voice and you explained the question really well.
@varunsadhu9060
@varunsadhu9060 4 жыл бұрын
Bro this was savage, better that quickselect and all sorting fuzz. I hope the interviewer would know what a bucket is 😁
@YashNagayach
@YashNagayach 2 жыл бұрын
I think in line 25 condition should be if (count < k) instead of (count == k).
@saurabhc4278
@saurabhc4278 3 жыл бұрын
What an explanation code bix !!!!!!!!!!!! Never going to forget this approach
@ramankr0022
@ramankr0022 Жыл бұрын
very helpful. thanks!
@imajt5
@imajt5 2 жыл бұрын
Bro you method of explaination is superb...thanks a lot
@ridj41
@ridj41 Жыл бұрын
pLease also mention the time and space complexity, as only then we are able to identify the most opti.solution.
@dev4life
@dev4life 4 жыл бұрын
Really nice solution bro. Got to learn a new approach to these kinds of problems 😄.
@codebix1096
@codebix1096 4 жыл бұрын
Glad it helped
@shubhammanecr7
@shubhammanecr7 Жыл бұрын
💥 amazing !
@sagardhankar1449
@sagardhankar1449 3 жыл бұрын
Thanku bhai your explaination is at top😀
@codebix1096
@codebix1096 3 жыл бұрын
Welcome 😊 Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true
@rishavranjan6656
@rishavranjan6656 Жыл бұрын
Iska brute force possible hai kya?
@aakashsharma5901
@aakashsharma5901 3 жыл бұрын
Very well explained sir...ur way of explation is too good
@codebix1096
@codebix1096 3 жыл бұрын
Thank you. Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true
@iuashrafi
@iuashrafi 9 ай бұрын
great!
@akshitajain3721
@akshitajain3721 3 жыл бұрын
Good expalanation !!!
@codebix1096
@codebix1096 3 жыл бұрын
Thanks 🙂
@saurabhkanswal7954
@saurabhkanswal7954 4 жыл бұрын
thanks a lot
@mansisharma4136
@mansisharma4136 3 жыл бұрын
in seraching last part it takes n2 times Then how is better you are using two loops there and doing n and k work in each loop respectively
@soumavanag5025
@soumavanag5025 3 жыл бұрын
using two loops doesnt necessarily means it will be o(n^2) here , using the two loops, all the elements are being visited exactly once. hence t(n) = o(n) do a dry run and check if each element is being visited more than once or not
@swatygupta3753
@swatygupta3753 4 жыл бұрын
awesome explaination, thank you.. For leetcode 692(top-k-frequent words), we have to display the list as --> If two words have the same frequency, then the word with the lower alphabetical order comes first. How to approach this one.
@mishra1576
@mishra1576 3 жыл бұрын
Study about compareTo method in java. Hope it helps
@saunaknandi1814
@saunaknandi1814 2 жыл бұрын
Can u make a video on bucket sort
@rilkedev449
@rilkedev449 2 жыл бұрын
Bhai thanks
@artone5841
@artone5841 7 ай бұрын
why the time complexity of o(n) , why not o(n*m)
@shubhramishra4568
@shubhramishra4568 4 жыл бұрын
very well explained
@codebix1096
@codebix1096 4 жыл бұрын
Thanks :)
@sagardhankar1449
@sagardhankar1449 3 жыл бұрын
sir (i-button) me suggested videos/ previous videos daal diya karo please usse videos pe jyada views & like ho jate h
@codebix1096
@codebix1096 3 жыл бұрын
Alright. Thank you. Follow our linkedin page for regular updates www.linkedin.com/company/codebix/?viewAsMember=true
@mridulkhurana533
@mridulkhurana533 4 жыл бұрын
Can't we just simply sort the hashMap according to values. It's Also O(nlogk) approach and quite easy
@codebix1096
@codebix1096 4 жыл бұрын
Yes we can do that as well but I think this will be similar as our first approach so time complexity will be O(nlogn)
@Vishalraj_1
@Vishalraj_1 4 жыл бұрын
FOR SOURCE CODE REFER : leetcode.com/explore/featured/card/july-leetcoding-challenge/546/week-3-july-15th-july-21st/3393/discuss/740538/C++-Solutionusing-Priority-Queue-and-Unordered_map
@ramanmanocha4800
@ramanmanocha4800 4 жыл бұрын
Can you please make a vodio on Wildcard character matching? Thank you
@codebix1096
@codebix1096 4 жыл бұрын
Sure will make a video on it
@gaunikasrivastava7851
@gaunikasrivastava7851 3 жыл бұрын
This utilises a lot of space
@AmritAgarwal07
@AmritAgarwal07 3 жыл бұрын
public static int[] topKFrequent(int[] nums, int k) { Arrays.sort(nums); HashMapmap=new HashMap(); for (int i = 0; i < nums.length; i++) { map.put(nums[i],map.getOrDefault(nums[i],0)+1); } Listlist=new ArrayList(map.keySet()); Collections.sort(list, (a, b) -> map.get(b) - map.get(a)); int[] result=new int[k]; for(int i=0;i
@saunaknandi1814
@saunaknandi1814 2 жыл бұрын
Bro can u share ur linkedIn profile
Top K Frequent Elements | Leetcode #347 | Heap | Hashmap
18:25
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 19 МЛН
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 1,7 МЛН
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 8 МЛН
Un coup venu de l’espace 😂😂😂
00:19
Nicocapone
Рет қаралды 10 МЛН
Remove K Digits | leetcode 402 | Hindi
16:39
Codebix
Рет қаралды 4,7 М.
Find Peak Element | leetcode 162 | Hindi
18:43
Codebix
Рет қаралды 14 М.
Recursion in Programming - Full Course
1:51:36
freeCodeCamp.org
Рет қаралды 955 М.
Minimum Cost For Tickets | leetcode 983 | Hindi
15:14
Codebix
Рет қаралды 7 М.
Top K Frequent Elements | Leetcode 347 | Priority Queue | Day-9
13:59
Top K Frequent Elements - Bucket Sort - Leetcode 347 - Python
13:13
6 Top K Frequent Numbers
12:37
Aditya Verma
Рет қаралды 120 М.
347. Top K Frequent Elements || Java || Leetcode || Hindi
13:32
Coding Sphere
Рет қаралды 2,1 М.
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 19 МЛН