Daily Dose of DSA - Day 12
//Problem link:https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
//Everyone knows
class Solution
{
public:
int maxProfit(vector<int>& prices) //naive solution
{
int diff;
int profit=0;
for(int i=0;i<pri...
legolas12hustle.dev1 min read
Atharva
Grind & Hustle
leetcode.com/problems/best-time-to-buy-and-sell-s…