L13. Fractional Knapsack Algorithm

Поделиться
HTML-код
  • Опубликовано: 25 май 2024
  • Find problem link, notes under Step 12: takeuforward.org/strivers-a2z...
    Follow me on socials: linktr.ee/takeUforward

Комментарии • 99

  • @AnishS-cp
    @AnishS-cp День назад +7

    your content is gold. Please public the stacks and queues series 🙂

    • @Deepakkumar-pm2kt
      @Deepakkumar-pm2kt 19 часов назад +2

      bhai kya hua stack and queue series kal toh dekhi thi maine aaj gayab kaise ho gyi??????????

    • @Josuke217
      @Josuke217 12 часов назад

      @@Deepakkumar-pm2kt audio quality accha nahi tha isliye re-upload kiya

  • @shwetathakare1556
    @shwetathakare1556 21 день назад +8

    Understood. Striver ,String series please its much needed!!!!

  • @guneeshvats46
    @guneeshvats46 День назад +6

    Striver why did you remove the Stacks and Queues Videos from your channel ?????

  • @sandeepxt99
    @sandeepxt99 Месяц назад +6

    I study DSA in many courses but trust me such a way, you teach never found.l❤

  • @priyanshpatro4548
    @priyanshpatro4548 День назад +6

    why did you remove the stack and queues playlist aadha kiya tha

  • @karthikeyanv4128
    @karthikeyanv4128 День назад +12

    hey striver why u did stack and queue playlist as private

    • @guneeshvats46
      @guneeshvats46 День назад +2

      Yes last night it was uploaded and now its not there what happened?

  • @parassingh3877
    @parassingh3877 Месяц назад +8

    Strings and stack queues after this please!

  • @unfamousgaayak4838
    @unfamousgaayak4838 Месяц назад +6

    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 ❤❤

  • @Dsa_kabaap
    @Dsa_kabaap Месяц назад +37

    Sir please start making videos on strings and stacks

    • @arunbhagat8023
      @arunbhagat8023 Месяц назад

      Recursion and Backtracking please

    • @shreyanshsrivastav6773
      @shreyanshsrivastav6773 Месяц назад +1

      @@arunbhagat8023 There is already a playlist on recursion by striver

    • @arunbhagat8023
      @arunbhagat8023 Месяц назад

      @@shreyanshsrivastav6773 that is basic

    • @arunbhagat8023
      @arunbhagat8023 Месяц назад

      @@shreyanshsrivastav6773 it is basic

    • @AmandeepSingh-rd6ql
      @AmandeepSingh-rd6ql 26 дней назад

      ​@@arunbhagat8023 please share the joint you are smoking 🚬

  • @ejeiwuhegej
    @ejeiwuhegej День назад +5

    Hey striver, please make the Stack Queue series public. I was in the middle of a video lol

  • @hat_awesome21
    @hat_awesome21 12 дней назад +3

    Sir ppz start stack and queue and strings 😢

  • @iamnoob7593
    @iamnoob7593 21 день назад +1

    Completed , Thanks a ton striver

  • @sushmi6400
    @sushmi6400 16 часов назад +3

    Where is stacks playlist...?striver...

  • @mbm.editzz
    @mbm.editzz День назад +6

    sir apne private kyu krdi stack best playlist thi

  • @summasumma
    @summasumma Месяц назад

    Nice! Thanks for clear explanation. May i know which pen/tablet and app you are using for this teaching ?

  • @Ayush-777
    @Ayush-777 Месяц назад +5

    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 Месяц назад +2

      bhai leave them basics must have been clear and now move to arrays directly.

  • @_thingsthatmatter
    @_thingsthatmatter 24 дня назад +2

    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.

  • @resha7601
    @resha7601 20 часов назад

    Hey Striver! Will there be a SDE SHEET CHALLENGE 2024? Love the work you do for the community

  • @52nevil36
    @52nevil36 Месяц назад +2

    Heart from india.. watching from 🇨🇦

  • @codewithsanjeev4236
    @codewithsanjeev4236 Месяц назад +3

    Please bring string series

  • @somith16
    @somith16 Месяц назад +2

    Recursion playlist needed

  • @viewer1821
    @viewer1821 6 дней назад +3

    stack series coming soon!!
    saw striver's leetcode profile he solved stack problems 😁

  • @anu6811
    @anu6811 Месяц назад

    understood ♥...... next heaps playlist please🥺!!!!

  • @arunbhagat8023
    @arunbhagat8023 Месяц назад +4

    Recursion Backtracking Strings and Stack Next Please...

  • @AbhishekSharma-hk8yh
    @AbhishekSharma-hk8yh Месяц назад +2

    please upload the videos of string

  • @BeWarrior-dw4br
    @BeWarrior-dw4br 17 часов назад +1

    Stack and Queue series kyun udd gayi?????

  • @Umesh-sk7km
    @Umesh-sk7km Месяц назад

    understood

  • @woebegonetv
    @woebegonetv Месяц назад +2

    Segment Tree videos plz

  • @yaswanthgummadi7318
    @yaswanthgummadi7318 15 дней назад +1

    Bro can you please solve the problem "STRONG PASSWORD CHECKER" in leetcode question no.420. And make a video on it.

  • @45vinitthakkar56
    @45vinitthakkar56 Месяц назад +2

    Stacks Queues plzzzzzz

  • @Deepakkumar-pm2kt
    @Deepakkumar-pm2kt 19 часов назад +1

    bro public the stack and queue playlist again plss

  • @mayankprakash9651
    @mayankprakash9651 Месяц назад

    Which notepad application are you using?

  • @sano9633
    @sano9633 Месяц назад

    can anyone tell me why Unauthorised showing again and again after i login from my gmail account

  • @ChaitanyaDugyani
    @ChaitanyaDugyani Месяц назад

    please upload video on java collections

  • @user-on9bq4pf4w
    @user-on9bq4pf4w 12 дней назад +1

    strings after this please

  • @subhamchatterjee9695
    @subhamchatterjee9695 22 дня назад

    brother pls upload the videos of string and stack queue

  • @Gg69696
    @Gg69696 26 дней назад +1

    is this the last video for greedy algorithms ??

  • @Sharath_Codm
    @Sharath_Codm 6 дней назад +1

    Start Doing on Strings please sir

  • @sonalipsadwibei2508
    @sonalipsadwibei2508 15 дней назад +1

    Please sir upload on string

  • @ishanmoykhede9484
    @ishanmoykhede9484 17 часов назад +1

    broo where did your stack and queue playlist gone 🥲

  • @niranjanvs6599
    @niranjanvs6599 Месяц назад

    I need Strings and Recursion videos

  • @rahulagrawal3611
    @rahulagrawal3611 Месяц назад

    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…

  • @sandeepxt99
    @sandeepxt99 Месяц назад

    ❤❤❤❤

  • @thoughtsofkrishna8963
    @thoughtsofkrishna8963 16 дней назад +1

    Waiting for strings playlist

  • @52nevil36
    @52nevil36 Месяц назад

    First comment.. love from 🇨🇦

  • @dhirisalasaisankar4338
    @dhirisalasaisankar4338 21 день назад

    Striver bro do video on Huffman coding

  • @shreerangaraju1013
    @shreerangaraju1013 25 дней назад

    Two City Scheduling Please

  • @zyzzbrah9429
    @zyzzbrah9429 Месяц назад +1

    can anyone paste complete cpp code here

  • @thenews8464
    @thenews8464 Месяц назад

    Why you made your screen small please zoom it although I cant concentrate seriously looking at you😅

  • @divyareddy7622
    @divyareddy7622 25 дней назад

    @takeUforward bhaiya pleasee give the codes too! THANKS A LOT

  • @storm19019
    @storm19019 25 дней назад

    We are the Zeta alpha and none other than sorcher ones

  • @storm19019
    @storm19019 25 дней назад

    Stack means lifo and queue means fifo naa

  • @nikhilpatidar9338
    @nikhilpatidar9338 21 день назад +1

    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_ 2 часа назад

      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 .

  • @keshavsharma-fk1hb
    @keshavsharma-fk1hb 29 дней назад

    Please upload string videos

  • @shravankumarsambaraju4219
    @shravankumarsambaraju4219 23 дня назад

    can you please let me know the app that you are using for writing notes while explaining

  • @storm19019
    @storm19019 26 дней назад

    Take this

  • @souvikbasak4396
    @souvikbasak4396 8 дней назад +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.

  • @devprasad8767
    @devprasad8767 Месяц назад

    Hi

  • @jalal-eddinelhachmi35
    @jalal-eddinelhachmi35 27 дней назад

    What is the name of the app he use?

  • @vighneshmudaliar3306
    @vighneshmudaliar3306 Месяц назад +3

    ye toh sach h ki bhagwan h

  • @guru-lu5vn
    @guru-lu5vn 19 дней назад

    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 25 дней назад

    Who who who who who who

  • @abhinavmaurya7305
    @abhinavmaurya7305 17 дней назад +1

    vote for System Design 👇👇👇👇

  • @cp65143
    @cp65143 Месяц назад

    Greedy: I am here to make profit not to enjoy my life😂

  • @storm19019
    @storm19019 25 дней назад

    U r trolled by me and my brother

  • @storm19019
    @storm19019 21 день назад

    Baccho ka dsa

  • @storm19019
    @storm19019 25 дней назад

    Look sandeep maheshwari greatest incentive ever than u

  • @SamsIt-hi9gf
    @SamsIt-hi9gf Месяц назад

    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 25 дней назад

    Who this rubbish sir

  • @guptaujjwal
    @guptaujjwal Месяц назад +13

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +2

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!

  • @parassingh3877
    @parassingh3877 Месяц назад +1

    Strings and stack queues after this please!