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 ❤❤
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
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.
we can easily solve this with the help of comparator just add all these values into a vector then just sort using a comparator on the basis of its unit weight then just for loop from 0-n-1 add weights if its larger then just add a else statement where you perform the knapsack fraction condition simple and best🥰🥰
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.
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
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 .
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…
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.
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
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
Understood. Striver ,String series please its much needed!!!!
I study DSA in many courses but trust me such a way, you teach never found.l❤
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 ❤❤
keep rocking bruh
One day you ill become @famousgaayak4838
Sir please start making videos on strings and stacks
Recursion and Backtracking please
@@arunbhagat8023 There is already a playlist on recursion by striver
@@shreyanshsrivastav6773 that is basic
@@shreyanshsrivastav6773 it is basic
@@arunbhagat8023 please share the joint you are smoking 🚬
Strings and stack queues after this please!
yes
Heart from india.. watching from 🇨🇦
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
Recursion Backtracking Strings and Stack Next Please...
sir apne private kyu krdi stack best playlist thi
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.
we can easily solve this with the help of comparator just add all these values into a vector then just sort using a comparator on the basis of its unit weight then just for loop from 0-n-1 add weights if its larger then just add a else statement where you perform the knapsack fraction condition simple and best🥰🥰
Completed , Thanks a ton striver
why did you remove the stack and queues playlist aadha kiya tha
Hey striver, please make the Stack Queue series public. I was in the middle of a video lol
why he did private bro????
paise mangega na abhi toh, tuf+ pe krega mujhe lgta hai
@@ASHUTOSHSHARMA-us6hd Its back up!!
@@ASHUTOSHSHARMA-us6hd fr bro , now i understand why he never upload strings on yt , bhai ko bhi course bechna h
understood, thanks for the perfect explanation
stack series coming soon!!
saw striver's leetcode profile he solved stack problems 😁
Link of profile
this playlist also done... thanks
Understood,Greate explanation.
Please bring string series
done n dusted 🔥
Recursion playlist needed
understood ♥...... next heaps playlist please🥺!!!!
Striver why did you remove the Stacks and Queues Videos from your channel ?????
Hai toh stacks and queue ka playlist
Undertstood but java Comparator is new to me
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.
bhai leave them basics must have been clear and now move to arrays directly.
done with greedy it was freaking awesome
Hey Striver! Will there be a SDE SHEET CHALLENGE 2024? Love the work you do for the community
hey striver why u did stack and queue playlist as private
Yes last night it was uploaded and now its not there what happened?
Series completed 😄
Where is stacks playlist...?striver...
Nice! Thanks for clear explanation. May i know which pen/tablet and app you are using for this teaching ?
vote for System Design 👇👇👇👇
Bro can you please solve the problem "STRONG PASSWORD CHECKER" in leetcode question no.420. And make a video on it.
Sir ppz start stack and queue and strings 😢
Waiting for strings playlist
love u bro💓
Understood
understood
please upload the videos of string
Segment Tree videos plz
Thank You!..
We are the Zeta alpha and none other than sorcher ones
bro public the stack and queue playlist again plss
I need Strings and Recursion videos
Start Doing on Strings please sir
Stacks Queues plzzzzzz
ye toh sach h ki bhagwan h
Stack and Queue series kyun udd gayi?????
@takeUforward bhaiya pleasee give the codes too! THANKS A LOT
Please sir upload on string
Greedy: I am here to make profit not to enjoy my life😂
Why you made your screen small please zoom it although I cant concentrate seriously looking at you😅
First comment.. love from 🇨🇦
strings after this please
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
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 .
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…
brother pls upload the videos of string and stack queue
is this the last video for greedy algorithms ??
please upload video on java collections
Stack means lifo and queue means fifo naa
Two City Scheduling Please
❤❤❤❤
Take this
can anyone tell me why Unauthorised showing again and again after i login from my gmail account
Striver bro do video on Huffman coding
Please upload string videos
Which notepad application are you using?
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.
can you please let me know the app that you are using for writing notes while explaining
onenote
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
can anyone paste complete cpp code here
Hi
Who who who who who who
us
What is the name of the app he use?
I wanna know this too
Look sandeep maheshwari greatest incentive ever than u
U r trolled by me and my brother
Baccho ka dsa
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
broo where did your stack and queue playlist gone 🥲
Who this rubbish sir
Strings and stack queues after this please!
understood
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!
Strings and stack queues after this please!