L13. Fractional Knapsack Algorithm

  Рет қаралды 45,248

take U forward

take U forward

Күн бұрын

Find problem link, notes under Step 12: takeuforward.o...
Follow me on socials: linktr.ee/take...

Пікірлер: 109
@shwetathakare1556
@shwetathakare1556 3 ай бұрын
Understood. Striver ,String series please its much needed!!!!
@guneeshvats46
@guneeshvats46 3 ай бұрын
Striver why did you remove the Stacks and Queues Videos from your channel ?????
@unfamousgaayak4838
@unfamousgaayak4838 4 ай бұрын
Hello bro , subscribed to ur channel today .. started late but one day even i have hopes that i will understand complex dsa problems. I want to switch from service based to product based .. the kind of work u r doing for us is truely inspirational. Keep inspiring us ❤❤
@SibiRanganathL
@SibiRanganathL Ай бұрын
keep rocking bruh One day you ill become @famousgaayak4838
@sandeepxt99
@sandeepxt99 4 ай бұрын
I study DSA in many courses but trust me such a way, you teach never found.l❤
@karthikeyanv4128
@karthikeyanv4128 3 ай бұрын
hey striver why u did stack and queue playlist as private
@guneeshvats46
@guneeshvats46 3 ай бұрын
Yes last night it was uploaded and now its not there what happened?
@priyanshpatro4548
@priyanshpatro4548 3 ай бұрын
why did you remove the stack and queues playlist aadha kiya tha
@Dsa_kabaap
@Dsa_kabaap 4 ай бұрын
Sir please start making videos on strings and stacks
@arunbhagat8023
@arunbhagat8023 4 ай бұрын
Recursion and Backtracking please
@shreyanshsrivastav6773
@shreyanshsrivastav6773 4 ай бұрын
@@arunbhagat8023 There is already a playlist on recursion by striver
@arunbhagat8023
@arunbhagat8023 4 ай бұрын
@@shreyanshsrivastav6773 that is basic
@arunbhagat8023
@arunbhagat8023 4 ай бұрын
@@shreyanshsrivastav6773 it is basic
@AmandeepSingh-rd6ql
@AmandeepSingh-rd6ql 3 ай бұрын
​@@arunbhagat8023 please share the joint you are smoking 🚬
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@Ayush-777
@Ayush-777 4 ай бұрын
A2Z DSA course , I am a new learner and found that some videos are coming soon, and in step 2, only counting frequencies of array elements and other videos are not uploaded. Please guide me on what we have to do here.
@lifehustlers164
@lifehustlers164 4 ай бұрын
bhai leave them basics must have been clear and now move to arrays directly.
@_thingsthatmatter
@_thingsthatmatter 3 ай бұрын
sir i love your vidoes u make dsa look very easy. i did linked list from you and understood all the concepts but stack and queue is something I am facing a lot of challenge with. can you please after this playlist complete the stack and queue playlist.
@mmbmmbmmb
@mmbmmbmmb 3 ай бұрын
sir apne private kyu krdi stack best playlist thi
@resha7601
@resha7601 3 ай бұрын
Hey Striver! Will there be a SDE SHEET CHALLENGE 2024? Love the work you do for the community
@summasumma
@summasumma 4 ай бұрын
Nice! Thanks for clear explanation. May i know which pen/tablet and app you are using for this teaching ?
@arunbhagat8023
@arunbhagat8023 4 ай бұрын
Recursion Backtracking Strings and Stack Next Please...
@riyan-g-4
@riyan-g-4 3 ай бұрын
Hey striver, please make the Stack Queue series public. I was in the middle of a video lol
@Deepakkumar-pm2kt
@Deepakkumar-pm2kt 3 ай бұрын
why he did private bro????
@ASHUTOSHSHARMA-us6hd
@ASHUTOSHSHARMA-us6hd 2 ай бұрын
paise mangega na abhi toh, tuf+ pe krega mujhe lgta hai
@abhimanyuambastha2595
@abhimanyuambastha2595 24 күн бұрын
@@ASHUTOSHSHARMA-us6hd Its back up!!
@nikhilpatidar9338
@nikhilpatidar9338 3 ай бұрын
Sir having a doubt not of this que I come through this problem many time as I try to run the code it executes and gives correct output for some case but sometimes submiting the code gives error at same test case with different output What actually is going on and how to handle it
@adnanbhat_
@adnanbhat_ 3 ай бұрын
use Double in the comparitor function so what happens is assum we have val1 = 10 , 7 and val 2 = 10 , 6 so it compares 10/7 , 10/6 becz in int type they both are 1 so it return 10/7 which is wrong but using double solves it .
@sushmi6400
@sushmi6400 3 ай бұрын
Where is stacks playlist...?striver...
@codewithsanjeev4236
@codewithsanjeev4236 4 ай бұрын
Please bring string series
@shravankumarsambaraju4219
@shravankumarsambaraju4219 3 ай бұрын
can you please let me know the app that you are using for writing notes while explaining
@zenterno-zt1pl
@zenterno-zt1pl 3 ай бұрын
onenote
@52nevil36
@52nevil36 4 ай бұрын
Heart from india.. watching from 🇨🇦
@mayankprakash9651
@mayankprakash9651 4 ай бұрын
Which notepad application are you using?
@BeWarrior-dw4br
@BeWarrior-dw4br 3 ай бұрын
Stack and Queue series kyun udd gayi?????
@souvikbasak4396
@souvikbasak4396 3 ай бұрын
Striver a request, could you kindly provide a shorter playlist version for the binary search playlist as you said you would and as you have done for graphs and dp , as we have very less time for placements.
@hat_awesome21
@hat_awesome21 3 ай бұрын
Sir ppz start stack and queue and strings 😢
@viewer1821
@viewer1821 3 ай бұрын
stack series coming soon!! saw striver's leetcode profile he solved stack problems 😁
@amankumarsingh3995
@amankumarsingh3995 3 ай бұрын
Link of profile
@kaichang8186
@kaichang8186 14 күн бұрын
understood, thanks for the perfect explanation
@yaswanthgummadi7318
@yaswanthgummadi7318 3 ай бұрын
Bro can you please solve the problem "STRONG PASSWORD CHECKER" in leetcode question no.420. And make a video on it.
@rahulagrawal3611
@rahulagrawal3611 4 ай бұрын
Striver bhai.. Plz add search bar in our website. Any problem I need to separately search in google tuf.. then in youtube tuf for video… tuf is my first preference for any dsa…
@deveshsharma-u2l
@deveshsharma-u2l 3 ай бұрын
did it myself ,thanks for building up my logic uptill now heres the code i did:class Solution { static class Pair implements Comparable{ double ratio; int index; public Pair(int index,double ratio){ this.index=index; this.ratio=ratio; } @Override public int compareTo(Pair p1){ return Double.compare(p1.ratio,this.ratio); } } // Function to get the maximum total value in the knapsack. double fractionalKnapsack(int w, Item arr[], int n) { PriorityQueuepq=new PriorityQueue(); for(int i=0;i
@iamnoob7593
@iamnoob7593 3 ай бұрын
Completed , Thanks a ton striver
@somith16
@somith16 4 ай бұрын
Recursion playlist needed
@ashishpradhan6250
@ashishpradhan6250 3 ай бұрын
this playlist also done... thanks
@AbhishekSharma-26
@AbhishekSharma-26 4 ай бұрын
please upload the videos of string
@Sharath_Codm
@Sharath_Codm 3 ай бұрын
Start Doing on Strings please sir
@woebegonetv
@woebegonetv 4 ай бұрын
Segment Tree videos plz
@ishanmoykhede9484
@ishanmoykhede9484 3 ай бұрын
broo where did your stack and queue playlist gone 🥲
@Gg69696
@Gg69696 3 ай бұрын
is this the last video for greedy algorithms ??
@Deepakkumar-pm2kt
@Deepakkumar-pm2kt 3 ай бұрын
bro public the stack and queue playlist again plss
@thenews8464
@thenews8464 4 ай бұрын
Why you made your screen small please zoom it although I cant concentrate seriously looking at you😅
@hareshnayak7302
@hareshnayak7302 Ай бұрын
Understood,Greate explanation.
@thoughtsofkrishna8963
@thoughtsofkrishna8963 3 ай бұрын
Waiting for strings playlist
@k-nl4kj
@k-nl4kj 2 ай бұрын
done with greedy it was freaking awesome
@anu6811
@anu6811 4 ай бұрын
understood ♥...... next heaps playlist please🥺!!!!
@AnchitaPanjeta
@AnchitaPanjeta 3 ай бұрын
strings after this please
@45vinitthakkar56
@45vinitthakkar56 4 ай бұрын
Stacks Queues plzzzzzz
@subhamchatterjee9695
@subhamchatterjee9695 3 ай бұрын
brother pls upload the videos of string and stack queue
@ChaitanyaDugyani
@ChaitanyaDugyani 4 ай бұрын
please upload video on java collections
@shreerangaraju1013
@shreerangaraju1013 3 ай бұрын
Two City Scheduling Please
@storm19019
@storm19019 3 ай бұрын
Stack means lifo and queue means fifo naa
@sonalipsadwibei2508
@sonalipsadwibei2508 3 ай бұрын
Please sir upload on string
@divyareddy7622
@divyareddy7622 3 ай бұрын
@takeUforward bhaiya pleasee give the codes too! THANKS A LOT
@user-rdr1712
@user-rdr1712 2 ай бұрын
Series completed 😄
@itishachoudhary906
@itishachoudhary906 11 күн бұрын
Thank You!..
@dhirisalasaisankar4338
@dhirisalasaisankar4338 3 ай бұрын
Striver bro do video on Huffman coding
@jalal-eddinelhachmi35
@jalal-eddinelhachmi35 4 ай бұрын
What is the name of the app he use?
@shreerangaraju1013
@shreerangaraju1013 3 ай бұрын
I wanna know this too
@sano9633
@sano9633 4 ай бұрын
can anyone tell me why Unauthorised showing again and again after i login from my gmail account
@niranjanvs6599
@niranjanvs6599 4 ай бұрын
I need Strings and Recursion videos
@keshavsharma-fk1hb
@keshavsharma-fk1hb 4 ай бұрын
Please upload string videos
@watch2-grow
@watch2-grow Ай бұрын
Understood
@storm19019
@storm19019 3 ай бұрын
We are the Zeta alpha and none other than sorcher ones
@52nevil36
@52nevil36 4 ай бұрын
First comment.. love from 🇨🇦
@abromioitis
@abromioitis 3 ай бұрын
vote for System Design 👇👇👇👇
@Umesh-sk7km
@Umesh-sk7km 4 ай бұрын
understood
@zyzzbrah9429
@zyzzbrah9429 4 ай бұрын
can anyone paste complete cpp code here
@vighneshmudaliar3306
@vighneshmudaliar3306 4 ай бұрын
ye toh sach h ki bhagwan h
@storm19019
@storm19019 3 ай бұрын
Take this
@sandeepxt99
@sandeepxt99 4 ай бұрын
❤❤❤❤
@cp65143
@cp65143 4 ай бұрын
Greedy: I am here to make profit not to enjoy my life😂
@storm19019
@storm19019 3 ай бұрын
Who who who who who who
@devprasad8767
@devprasad8767 4 ай бұрын
Hi
@bhavyagarhwal7744
@bhavyagarhwal7744 2 ай бұрын
us
@storm19019
@storm19019 3 ай бұрын
Look sandeep maheshwari greatest incentive ever than u
@guru-lu5vn
@guru-lu5vn 3 ай бұрын
OPTIMAL SOLUTION $$ class Solution { public: static bool comp(Item a, Item b){ double r1 = (double) a.value/a.weight; double r2 = (double) b.value/b.weight; return r1>r2; } // Function to get the maximum total value in the knapsack. double fractionalKnapsack(int w, Item arr[], int n) { // Your code here double totalval=0; sort(arr,arr+n,comp); for(int i=0;i
@storm19019
@storm19019 3 ай бұрын
U r trolled by me and my brother
@storm19019
@storm19019 3 ай бұрын
Baccho ka dsa
@SamsIt-hi9gf
@SamsIt-hi9gf 4 ай бұрын
class Solution { public: // Function to get the maximum total value in the knapsack. double fractionalKnapsack(int w, Item arr[], int n) { typedef pairpfi; priority_queuepq; for(int i = 0;i0&&pq.size()>0){ auto it = pq.top(); pq.pop(); double vl = it.second.first; double wt = it.second.second; if(wt
@storm19019
@storm19019 3 ай бұрын
Who this rubbish sir
@guptaujjwal
@guptaujjwal 4 ай бұрын
Strings and stack queues after this please!
@Sharath_Codm
@Sharath_Codm 3 ай бұрын
yes
@SibiRanganathL
@SibiRanganathL Ай бұрын
understood
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
@parassingh3877
@parassingh3877 4 ай бұрын
Strings and stack queues after this please!
L12. Candy | Slope Approach Intuition Based
30:10
take U forward
Рет қаралды 31 М.
Time and Space Complexity - Strivers A2Z DSA Course
35:16
take U forward
Рет қаралды 644 М.
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 7 МЛН
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 39 МЛН
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,4 МЛН
5 Languages I Will NEVER Learn
12:24
Language Simp
Рет қаралды 180 М.
Viral Video of a Man's Crazy Job Interview
16:02
Darryl Vega TV
Рет қаралды 1,4 МЛН
Quick Sort For Beginners | Strivers A2Z DSA Course
35:17
take U forward
Рет қаралды 421 М.
Magnus Carlsen Giving HILARIOUS Answers for 8 Minutes Straight
8:24
LOSING WEIGHT & BEERBICEPS | Standup Comedy by Gautham Govindan
15:40
Gautham Govindan
Рет қаралды 302 М.
The Wordpress drama keeps getting worse
12:47
Theo - t3․gg
Рет қаралды 103 М.
I Solved 100 LeetCode Problems
13:11
Green Code
Рет қаралды 116 М.
Стойкость Фёдора поразила всех!
00:58
МИНУС БАЛЛ
Рет қаралды 7 МЛН