LeetCode | 1838. Frequency of the Most Frequent Element | Sliding Window | PrefixSum

preview_player
Показать описание
The frequency of an element is the number of times it occurs in an array.

You are given an integer array nums and an integer k. In one operation, you can choose an index of nums and increment the element at that index by 1.

Return the maximum possible frequency of an element after performing at most k operations.

#leetcode #dsa #slidingwindow #prefixsum
Рекомендации по теме
Комментарии
Автор

good explanation, don't stop making video's, you are a good tutor

ashutoshbajpai
Автор

Bro I am learning DSA for 15 days consistently for 5 hours everyday. But I was only able to solve 2 Easy array problems on leetcode. Is it normal I am having a lot of self doubts. I have solved more than 30 problems of arrays but by watching strivers A2Z DSA sheet. I am not able to come up with solution on my own

harshgoyal
Автор

I'm struck in this problem for a week. Thank you so much, well explained👍🏻

nivedhav
Автор

searching for sol for 2 hoours now i found this gem video

thank you

OG_RAJAT
Автор

Explanation is not that much clear at 5:22 and 5:24

singhji