Тёмный

826. Most Profit Assigning Work | count sort | max array | leetcode daily challenge | DSA | Hindi 

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

Problem Name:
826. Most Profit Assigning Work
Problem Statement:
You have n jobs and m workers. You are given three arrays: difficulty, profit, and worker where:
difficulty[i] and profit[i] are the difficulty and the profit of the ith job, and
worker[j] is the ability of jth worker (i.e., the jth worker can only complete a job with difficulty at most worker[j]).
Every worker can be assigned at most one job, but one job can be completed multiple times.
For example, if three workers attempt the same job that pays $1, then the total profit will be $3. If a worker cannot complete any job, their profit is $0.
Return the maximum profit we can achieve after assigning the workers to the jobs.
Problem link:
leetcode.com/problems/most-pr...
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​

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

 

16 июн 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@dibakarbera1971
@dibakarbera1971 Месяц назад
Thank you sir
@anirbandutta2266
@anirbandutta2266 Месяц назад
Nice approach!
@RohitKumar-dz8dh
@RohitKumar-dz8dh Месяц назад
Thanks 😊
@PrakashRai-ff3pr
@PrakashRai-ff3pr Месяц назад
sir while solving question jo bhi approach aate hai aapke mind mai woh kese aate hai??aur hamare mai kab tak aa jayega like kuch specific topic tak hm cover kr lenge tab tak ya kuch aur....plz tell bahot help ho jayegi
@aryanarvind3733
@aryanarvind3733 Месяц назад
I used to feel the same bro...kab mujhse solve hoga...easy leetocode questions bhi solve nhi hote hai khudse... medium or hard kese hoga etc etc What I found is that following a structured sheet of questions is very helpful. I am following strivers A2Z sheet It has easy, medium and hard questions of all the topics I used to solve easy and medium questions Jisme Dynamic programing ya koi fundamental topic esa na involved ho Jo mujhe nhi aata...for example mai agar ek array ka question solve kar rha hu toh I will follow sheet ka order to compound and build the concepts on the previously learnt concepts. Then question open karke sabse pehle usme kya topics involved hai wo dekhta hu jisse ki mujhe similar pattern find ya recall karne me easy rhe...then I look for the constraints too...Time complexity also helps ki approach kya honi chahiye also hints bhi helpful hote hai. First brute force try karta hu and test cases ke according code me changes karta hu Then I move to code optimisation Khud se sochta hu ki kya kar sakte hai And after 30 mins of deep observation if I am not able to optimise or find the exact solution then I look for the discussions tab for more hints and after this I look for solution videos.
@PrakashRai-ff3pr
@PrakashRai-ff3pr Месяц назад
@@aryanarvind3733 bhyii jo bhi tumne bola sach mai bahot help ful hai meri yhi galti hoti thi ki mai direct solution pe jump jar jata tha rather than koi hint pta karne k jisse mai code khud karu...but they way you r doing i will follow the same...thanks❤️...but hn sometimes easy problem bhi solve na hote to mak bhi yhi sochta hu ki medium kese solve karunga fir
@aryanarvind3733
@aryanarvind3733 Месяц назад
​@PrakashRai-ff3pr do not worry and do not hurry... trust the process bss just be consistent and keep revising the questions jo bhi solve karte ho. Hojayega sab 🙌
@GirjeshSharma-gw4og
@GirjeshSharma-gw4og 29 дней назад
Samaj nahi aaya bahut hard h
Далее
Чистка пляжа с золотом
00:49
Просмотров 258 тыс.
Top 7 Algorithms for Coding Interviews Explained SIMPLY
21:22
DARKER SIDE of SOFTWARE ENGINEERING !!
12:09
Просмотров 136 тыс.
8 patterns to solve 80% Leetcode problems
7:30
Просмотров 276 тыс.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36