Minimum Cost to Hire K Workers - Leetcode 857 - Python

preview_player
Показать описание


0:00 - Read the problem
0:30 - Intuition
5:33 - Drawing Explanation
13:00 - Coding Solution

leetcode 857

#neetcode #leetcode #python
Рекомендации по теме
Комментарии
Автор

Sorry I missed so many days lately. I'll be much more consistent going forward. You can count on it!

NeetCodeIO
Автор

Companies asking this question in Interview ❌
Companies implementing this ✅

asmodeus
Автор

3:20 "if we wanna be full capitalists"

- Neetcode

tusharsingh
Автор

There's no way I can come up with this logic in an interview

venkateshnaidu
Автор

this one got me confused for days but your explanations always helps me understand every problem better.

rawatvinod
Автор

*capitalists have left the conversation

you can get 20 units of work for the half price (50)
no, I can get 15 units for the double price (105)

iliadmitriev
Автор

Thanks!
Don't disappear for so long.

antm
Автор

Thank you for significantly reducing the time I would have spent on the editorial

kareemadesola
Автор

What about the case when the max value that you pop from the heap is the value that you have just added, in that case would it still be valid to evaluate res using the current rate?

krit
Автор

Thank you for the best explanation ever! After the first 4-5 minutes of the video, I was able to figure out a solution on my own.

EduardYudinkov
Автор

I have tried to solve this task for 2 hours! Unreal problem!

JamesBond-mqpd
Автор

I think the time complexity can be simplified as O(nlogn) since n >= k

LimpBizkit
Автор

this has to be the most convoluted explanation of K workers problem I've heard 😅

sirajussalekin
Автор

Please help me with this question. I'm going to use sliding window starting from 1 to len(quality) . From heap I'm going to pop when : while heap and len(heap) > k, heapq.heappop(heap). But I don't realize how to check when I am heappush to heap?

Munchen
Автор

What I learned today is being too good at your job is not necessarily going to get you a job.

aritrobiswas
Автор

thanks, I did not even understand the question

kwakukusi
Автор

This is very similar to a question that we ask at Disney+

Sarwaan
Автор

Hi navdeep, any good resource recommendations to learn how to determine space and time complexity for my own created solution? and also any website that can explains DSA terminology well?

Techgether
Автор

This is somehow worse than current industry pay scaling, so expect to see this adopted next year.

torvasdh
Автор

There is a problem, we are calculating total_quality * rate, but one of the individual wage might hit the wage cap and must be discarded?Can you explain sir

copilotcoder
visit shbcf.ru