Tag: software-development

  • Algorithm to get max profit from stock transactions [LC150]

    Hello friends, Today let’s go over the algorithm to find maximum profit out of stock buy and sell. Let’s first understand the problem statement. You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit. If you cannot achieve any profit, return…