Wine Buying and Selling Problem | Greedy Algorithm | DSA-One Course #97
VloĆŸit
- Äas pĆidĂĄn 31. 07. 2022
- Hey guys, In this video, We will learn about the wine buying and selling problem using the Greedy Algorithm.
Practice here: practice.geeksforgeeks.org/pr...
đ„ł Join our Telegram Community:
Telegram channel: telegram.me/realanujbhaiya
Telegram group: telegram.me/dsa_one
đ Follow me on:
Instagram: / anuj.kumar.sharma
Linkedin: / sharma-kumar-anuj
Twitter: / realanujbhaiya
đž Use coupon code ANUJBHAIYA on GeeksforGeeks to avail discounts on courses!
đ Complete DSA Playlist: âą DSA-One Course - The C...
Complete Android Development Playlist: âą Android Development Tu...
Hashtags:
#anujbhaiya #dsaone
Ignore these tags:
greedy algorithm
anuj bhaiya dsa
anuj bhaiya java
dsa
buying and selling
dsa one
greedy playlist
java anuj bhaiya
anuj kumar sharma
dsa anuj bhaiya
dsa course
dsa one course
dsp anuj bhaiya
greedy algorithm java
what is greedy algorithm
wine buying and selling problem
activity selection problem
activity selection problem using greedy method
dsa and algorithm
dsa crash course
dynamic programming problems
greedy algorithm playlist
greedy method
greedy search
greedy technique
java anuj
It will not be b
No it should be && only
Love the way you teachâ€ïž
nice
NICE SUPER EXCELLENT MOTIVATED
Just a suggestion, In 'Practice here' pls. share the link of leetcode rather than gfg or both.
First
Bhaiya c++ code bhi btaya karo
Fourth
In addition to above this can be the simplest approch
int b=0;
int s=0;
int ans=0;
int sum=0;
for(int i=0;i
Firs explain questions
It's giving TLE
One more much simpler code to solve this same problem âŹ
class Solution {
long wineSelling(int arr[],int n){
int ans=0;
for(int i=0;i
Awesome soln, how did you get this
Third đ
Second đ
Third