1701. Average Waiting Time | Simulation | Array

Пікірлер: 15

  • @redeye5183
    @redeye518315 күн бұрын

    Bro weekly contest ke solution nahi dale. What happened?

  • @ARYANMITTAL

    @ARYANMITTAL

    15 күн бұрын

    Sir discord group dekho ek baar 🫡❤️

  • @redeye5183

    @redeye5183

    15 күн бұрын

    ​@@ARYANMITTALOk👍

  • @ARYANMITTAL

    @ARYANMITTAL

    14 күн бұрын

    Ye lo ji ❤️ - kzread.info/dash/bejne/daeemJeKhLbIXZc.html

  • @chakri6262
    @chakri626215 күн бұрын

    Solved but visited this video for another approach. Great work especially comparing the model questions that's very good way to do.

  • @naamnhibataunga5897
    @naamnhibataunga589715 күн бұрын

    i believe this is an easy question: class Solution { public: double averageWaitingTime(vector& customers) { double waittime=0; int time=customers[0][0]; int n=customers.size(); for(int i=0;itime){ time=customers[i][0]+customers[i][1]; } else{ time+=customers[i][1]; } waittime+=(time-customers[i][0]); } return waittime/n; } };

  • @randomlad9312
    @randomlad931215 күн бұрын

    Its like FCFS turn around time (cpu scheduling)

  • @hardikpatel352
    @hardikpatel35215 күн бұрын

    Thanks

  • @harshlimbachiya7510
    @harshlimbachiya751015 күн бұрын

    amazing explanation buddy 👌

  • @viishhnurangaraju
    @viishhnurangaraju15 күн бұрын

    I am sure this everyone can understand class Solution { public double averageWaitingTime(int[][] customers) { int n = customers.length; // Calcuclate the completion time for each process int completionTime = customers[0][0]; double sum = 0; for(int i=0;i= AT){ completionTime += BT; } else{ completionTime = AT + BT; } int tat = completionTime - AT; sum += tat; } return sum/n; } }

  • @user-yh5jb2pg3d
    @user-yh5jb2pg3d15 күн бұрын

    You haven't uploaded the solution of weekly contest 405 happened on Sunday, 7 july 2024

  • @ARYANMITTAL

    @ARYANMITTAL

    15 күн бұрын

    Sir discord group dekho ek baar 🫡❤️

  • @ARYANMITTAL

    @ARYANMITTAL

    14 күн бұрын

    Ye lo ji ❤️ - kzread.info/dash/bejne/daeemJeKhLbIXZc.html

  • @ishank562
    @ishank56215 күн бұрын

    sirr weekly contest 405 solution ??

  • @ARYANMITTAL

    @ARYANMITTAL

    14 күн бұрын

    Ye lo ji ❤️ - kzread.info/dash/bejne/daeemJeKhLbIXZc.html