<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Greedy on Vhaos&#39;s Leetcode Solutions</title>
    <link>https://vhaos-leetcode-solutions.now.sh/tags/greedy/</link>
    <description>Recent content in Greedy on Vhaos&#39;s Leetcode Solutions</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <copyright>Kareem Daggash</copyright>
    <lastBuildDate>Sun, 04 Oct 2020 01:00:52 +0100</lastBuildDate>
    
	<atom:link href="https://vhaos-leetcode-solutions.now.sh/tags/greedy/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Remove Covered Intervals</title>
      <link>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/october/4-remove-covered-intervals/</link>
      <pubDate>Sun, 04 Oct 2020 01:00:52 +0100</pubDate>
      
      <guid>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/october/4-remove-covered-intervals/</guid>
      <description>LeetCode October - Day 4 Problem Statement Given a list of intervals, remove all intervals that are covered by another interval in the list.
Interval [a,b) is covered by interval [c,d) if and only if c &amp;lt;= a and b &amp;lt;= d.
After doing so, return the number of remaining intervals.
Example 1:
Input: intervals = [[1,4],[3,6],[2,8]] Output: 2 Explanation:
Interval [3,6] is covered by [2,8], therefore it is removed.</description>
    </item>
    
    <item>
      <title>Distribute Candies to People</title>
      <link>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/august/17-distribute-candies-to-people/</link>
      <pubDate>Mon, 17 Aug 2020 01:00:52 +0100</pubDate>
      
      <guid>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/august/17-distribute-candies-to-people/</guid>
      <description>LeetCode August - Day 17 Problem Statement We distribute some number of candies, to a row of n = num_people people in the following way:
We then give 1 candy to the first person, 2 candies to the second person, and so on until we give n candies to the last person.
Then, we go back to the start of the row, giving n + 1 candies to the first person, n + 2 candies to the second person, and so on until we give 2 * n candies to the last person.</description>
    </item>
    
    <item>
      <title>Best Time to Buy and Sell Stock III</title>
      <link>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/august/16-best-time-to-buy-and-sell-stock-iii/</link>
      <pubDate>Sun, 16 Aug 2020 01:00:52 +0100</pubDate>
      
      <guid>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/august/16-best-time-to-buy-and-sell-stock-iii/</guid>
      <description>LeetCode August - Day 16 Problem Statement Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions.
Note: You may not engage in multiple transactions at the same time (i.e., you must sell the stock before you buy again).
Example 1:
Input: [3,3,5,0,0,3,1,4] Output: 6 Explanation: Buy on day 4 (price = 0) and sell on day 6 (price = 3), profit = 3-0 = 3.</description>
    </item>
    
    <item>
      <title>Non-Overlapping Intervals</title>
      <link>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/august/15-non-overlapping-intervals/</link>
      <pubDate>Sat, 15 Aug 2020 01:00:52 +0100</pubDate>
      
      <guid>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/august/15-non-overlapping-intervals/</guid>
      <description>LeetCode August - Day 15 Problem Statement Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.
Example 1:
Input: [[1,2],[2,3],[3,4],[1,3]] Output: 1 Explanation: [1,3] can be removed and the rest of intervals are non-overlapping.
Example 2:
Input: [[1,2],[1,2],[1,2]] Output: 2 Explanation: You need to remove two [1,2] to make the rest of intervals non-overlapping.
Example 3:</description>
    </item>
    
    <item>
      <title>Best Time to Buy and Sell Stock With Cooldown</title>
      <link>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/july/29-best-time-to-buy-and-sell-stock-with-cooldown/</link>
      <pubDate>Wed, 29 Jul 2020 01:00:52 +0100</pubDate>
      
      <guid>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/july/29-best-time-to-buy-and-sell-stock-with-cooldown/</guid>
      <description>LeetCode July - Day 29 Problem Statement Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple times) with the following restrictions:
You may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again).</description>
    </item>
    
    <item>
      <title>Task Scheduler</title>
      <link>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/july/28-task-scheduler/</link>
      <pubDate>Tue, 28 Jul 2020 01:00:52 +0100</pubDate>
      
      <guid>https://vhaos-leetcode-solutions.now.sh/leetcodedaily/july/28-task-scheduler/</guid>
      <description>LeetCode July - Day 28 Problem Statement You are given a char array representing tasks CPU need to do. It contains capital letters A to Z where each letter represents a different task. Tasks could be done without the original order of the array. Each task is done in one unit of time. For each unit of time, the CPU could complete either one task or just be idle.
However, there is a non-negative integer n that represents the cooldown period between two same tasks (the same letter in the array), that is that there must be at least n units of time between any two same tasks.</description>
    </item>
    
  </channel>
</rss>