2037. Minimum Number of Moves to Seat Everyone | Greedy | Counting Sort

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • In this video, I'll talk about how to solve Leetcode 2037. Minimum Number of Moves to Seat Everyone | Greedy | Counting Sort
    Counting Sort Entire Explanation - • 1122. Relative Sort Ar...
    Practice Problem for Counting Sort - • 75. Sort Colors | 2 Po...
    Let's Connect:
    📱Discord (Join Community) : / discord
    📝Linkedin: / aryan-mittal-0077
    📸 Instagram: / codewitharyanbhai
    💻 Twitter - / aryan_mittal007
    🤖 Github: github.com/ary...
    About Me:
    I am Aryan Mittal - A Software Engineer in Goldman Sachs, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
    ✨ Hashtags ✨
    #programming #Interviews #leetcode #faang #maang #datastructures #algorithms

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

  • @harshitagupta3645
    @harshitagupta3645 3 месяца назад +5

    your dedication and consistency >>>>> laptop khulte hi aaj k question ki video bhi aa jaati h.

  • @aggarwalsachin4854
    @aggarwalsachin4854 3 месяца назад +2

    bhaii thoda clear bola krr

  • @codebreaker6578
    @codebreaker6578 3 месяца назад +1

    can't we do it using hashmap that will be same as taking arr[101]
    class Solution {
    public:
    int minMovesToSeat(vector& seats, vector& students) {
    multimapmp1;
    multimapmp2;
    for(int i=0;ifirst);
    it1++;
    it2++;
    }
    return sum;
    }
    };

  • @AnujB-d9l
    @AnujB-d9l Месяц назад

    what if seats = [0,1,2,3] & students = [1,2,3,4] will this alg stills works on this testcase

    • @AnujB-d9l
      @AnujB-d9l Месяц назад

      yes it really works, sorry for asking bro