1838. Frequency of the Most Frequent Element | Sliding Window Template | Shrinking & Non-Shrinking

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 21

  • @ARYANMITTAL
    @ARYANMITTAL  Год назад +19

    Do solve this one, it is the most Frequently asked question in Amazon !! - Intuition samaj aaya kya 🫡??

  • @worldofniyathi
    @worldofniyathi 9 месяцев назад +8

    i have searched more than 5 solutions and even saw a top viewed video, but your solution is crystal clear, thank you so much 😊 , keep growing

  • @yashpadiyar4952
    @yashpadiyar4952 Год назад +5

    Aapse itne mahino mee itna sikh chuka huu ki ab bass aapko dekhe ke liye video kholta huu😌😂,Thanks a ton

  • @Divy2-zx4eo
    @Divy2-zx4eo 4 месяца назад +3

    damm bhai, first video of yours, already too impressed with the explaination

  • @hardikpatel352
    @hardikpatel352 8 месяцев назад +1

    best solution with better explaination

  • @VishalKumar-uu3xm
    @VishalKumar-uu3xm Год назад +1

    Best explaination so for just by intution i write the whole code

  • @KyuriousBot
    @KyuriousBot 11 месяцев назад

    You explained this so well! I think you will give tough competition to neetcode and pepcoding! Awesome work Aryan bhai. Keep going!

  • @OmprakashYadav-nq8uj
    @OmprakashYadav-nq8uj 7 месяцев назад +1

    public int maxFrequency(int[] nums, int k) {
    Arrays.sort(nums);
    int n = nums.length;
    long runningSum = 0;
    int start = 0;
    int end = 0;
    long maxFreq = 1;
    while (end < n) {
    long diff = end - start;
    long req = diff * nums[end] - runningSum;
    if (req

  • @jamjam3448
    @jamjam3448 3 месяца назад

    thanks a million. I finally understand it

  • @prashant12313
    @prashant12313 Год назад +2

    such a great explaination sir 😍😍

  • @tarunsahu1366
    @tarunsahu1366 9 месяцев назад

    excellent explanation!!!

  • @dayashankarlakhotia4943
    @dayashankarlakhotia4943 Год назад +1

    public int maxFrequency (int[]nums,int k){
    int ans=0; long sum=0;
    Arrays.sort (nums);
    for(int l=0,r=0;r

  • @silvbgf5253
    @silvbgf5253 Год назад

    bro thats brilliant!

  • @mohdkhaleeq7468
    @mohdkhaleeq7468 Год назад +2

    i am not able to solve this type of questions how should i improve

  • @vineetherenj3143
    @vineetherenj3143 Год назад

    pls also explain two pointer method for this problem

  • @sunny01111
    @sunny01111 Год назад

    Sir please make video on sliding window concept please 🙏

  • @pavanyadav3092
    @pavanyadav3092 9 месяцев назад

    thank you

  • @bachkhoahuynh9110
    @bachkhoahuynh9110 Год назад +1

    Why haven't you made a video on yesterday's daily problem?

    • @ARYANMITTAL
      @ARYANMITTAL  Год назад +4

      Bro, please join telegram channel, every updates are given there, for every slightest of delays too ❤️!! - Reason was I was travelling back to blr & then straight went to office due to critical task and came back home at 11pm ist, thus couldn’t make it.

  • @brainmosquito7
    @brainmosquito7 14 дней назад

    plz dont copy striver's style of teaching humble request it looks cringe