Тёмный

1701. Average Waiting Time | Leetcode Daily Challlenge | Arrays | DSA | Hindi 

shashCode
Подписаться 16 тыс.
Просмотров 2,1 тыс.
50% 1

Problem Name:
1701. Average Waiting Time
Problem Statement:
There is a restaurant with a single chef. You are given an array customers, where customers[i] = [arrivali, timei]:
arrivali is the arrival time of the ith customer. The arrival times are sorted in non-decreasing order.
timei is the time needed to prepare the order of the ith customer.
When a customer arrives, he gives the chef his order, and the chef starts preparing it once he is idle. The customer waits till the chef finishes preparing his order. The chef does not prepare food for more than one customer at a time. The chef prepares food for customers in the order they were given in the input.
Return the average waiting time of all customers. Solutions within 10-5 from the actual answer are considered accepted.
Problem Link:
leetcode.com/problems/average...
Graph Playlist:
• Graph Data Structure S...
Java Plus DSA Placement Course Playlist:
• Java and DSA Course Pl...
Java Plus DSA Sheet:
docs.google.com/spreadsheets/...
Notes:
github.com/Tiwarishashwat/Jav...
Telegram Link:
shashwattiwari.page.link/tele...
Ultimate Recursion Series Playlist:
• Recursion and Backtrac...
Instagram Handle: (@shashwat_tiwari_st)
shashwattiwari.page.link/shas...
Samsung Interview Experience:
• I cracked Samsung | SR...
Company Tags:
Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe | Samsung
Timestamp:
0:00 - Introduction
#ShashwatTiwari #coding​​ #problemsolving​

Опубликовано:

 

7 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@shashwat_tiwari_st
@shashwat_tiwari_st 22 дня назад
like target is 90. Please do like, if you understood the solution😄😄
@motivationalquotes6581
@motivationalquotes6581 21 день назад
linkedin pe tag kardunga daily solve karne pe
@kumaraniket1640
@kumaraniket1640 22 дня назад
really solving leetcode problem has been this much easy thank you for the proper explaination big fan sir , can you please make playlist on AWS fundamentals and also hand-on experience on it
@GirjeshSharma-zv3xo
@GirjeshSharma-zv3xo 21 день назад
Love from Australia❤
@a3rdtierguy864
@a3rdtierguy864 21 день назад
If someone solved merge interval he will definitely able to solve this.
@RohitKumar-dz8dh
@RohitKumar-dz8dh 21 день назад
Thanks 😊
@saisree04
@saisree04 21 день назад
Thank youu, your explanation is super simple and easy to follow. I am glad that i found your channel.
@RahulKumar-et4pm
@RahulKumar-et4pm 21 день назад
basic question of cpu scheduling of Operating System.
@PiyushSharma-we8yd
@PiyushSharma-we8yd 22 дня назад
aaj ka ho gya tha, mai attendance lagane aaya hu🤩🤩
@adarshjain3058
@adarshjain3058 21 день назад
attendance++;
@keshavgupta9174
@keshavgupta9174 21 день назад
class Solution { public double averageWaitingTime(int[][] customers) { int n = customers.length; double totalWaitTime = 0; int currTime = 0; for (int[] customer : customers) { int arrivalTime = customer[0]; int cookTime = customer[1]; if (currTime < arrivalTime) { currTime = arrivalTime; } int waitTime = currTime + cookTime - arrivalTime; totalWaitTime += waitTime; currTime += cookTime; } return totalWaitTime / n; } }
@thAsciNileshPal
@thAsciNileshPal 21 день назад
samjhate theek ho ,but thoda dheere samjhaya kro ; bhaot speed me expalin karte ho ...time leke explain kiya kro
@shankitkumar820
@shankitkumar820 21 день назад
No, His speed is just fine. If he will make long videos of each question then no one will get interested as every video will be atleast half hour long. I would recommend you to try each and every step yourself and ask doubt on comment section.
@thAsciNileshPal
@thAsciNileshPal 21 день назад
@@shankitkumar820 ha to khudse hi to kar raha code , konsa sir muje type kar k de rahe
Далее
Coding Interviews Be Like
5:31
Просмотров 6 млн
Fast and Furious: New Zealand 🚗
00:29
Просмотров 33 млн
Я КУПИЛ САМЫЙ МОЩНЫЙ МОТОЦИКЛ!
59:15
10 Math Concepts for Programmers
9:32
Просмотров 1,8 млн
Winning Google Kickstart Round A 2020 + Facecam
17:10
5 Useful F-String Tricks In Python
10:02
Просмотров 285 тыс.
My Brain after 569 Leetcode Problems
7:50
Просмотров 2,5 млн
How I would learn Leetcode if I could start over
18:03
Просмотров 382 тыс.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36