greedy algorithms

Best Time to Buy and Sell Stock II

Here, We see Best Time to Buy and Sell Stock II problem Solution. This Leetcode problem done in many programming language like C++, Java, JavaScript, Python etc. LeetCode Problem :- You are given an integer array prices where prices[i] is the price of a given stock on the ith day. On each day, you may decide to buy and/or sell the stock. …

Best Time to Buy and Sell Stock II Read More »

Greedy Algorithms

Here, We will discuss about Greedy algorithm, their element and Characteristics, advantages and disadvantages, and their applications. What is Greedy Algorithm? A Greedy Algorithm is a simple, intuitive algorithm that is used in optimization problem. It is designed to achieve optimum solution for a given problem. This algorithm builds up a solution by choosing the …

Greedy Algorithms Read More »