双指针选择

11. 盛最多水的容器
44. 通配符匹配

45. 跳跃游戏 II
55. 跳跃游戏
122. 买卖股票的最佳时机 II
134. 加油站
135. 分发糖果
179. 最大数
253. 会议室 II
316. 去除重复字母
334. 递增的三元子序列
376. 摆动序列
402. 移掉 K 位数字
406. 根据身高重建队列
409. 最长回文串
410. 分割数组的最大值
435. 无重叠区间
452. 用最少数量的箭引爆气球
455. 分发饼干
502. IPO
561. 数组拆分 I
581. 最短无序连续子数组
611. 有效三角形的个数
621. 任务调度器
========================
624. 数组列表中的最大距离
670. 最大交换
678. 有效的括号字符串
680. 验证回文字符串 Ⅱ
714. 买卖股票的最佳时机含手续费
738. 单调递增的数字
763. 划分字母区间
========================

765. 情侣牵手
767. 重构字符串
781. 森林中的兔子
826. 安排工作以达到最大收益
860. 柠檬水找零
861. 翻转矩阵后的得分
881. 救生艇
921. 使括号有效的最少添加
945. 使数组唯一的最小增量
954. 二倍数对数组
991. 坏了的计算器
1005. K 次取反后最大化的数组和
1011. 在 D 天内送达包裹的能力
1024. 视频拼接
1029. 两地调度
1053. 交换一次的先前排列
1081. 不同字符的最小子序列
1382. 将二叉搜索树变平衡
1217. 玩筹码
1221. 分割平衡字符串
1247. 交换字符使得字符串相同
1262. 可被三整除的最大和
1353. 最多可以参加的会议数目
1386. 安排电影院座位
1400. 构造 K 个回文字符串
1488. 避免洪水泛滥
1605. 给定行和列的和求可行矩阵
1647. 字符频次唯一的最小删除次数
1663. 具有给定数值的最小字符串
1689. 十-二进制数的最少数目
1710. 卡车上的最大单元数
1713. 得到子序列的最少操作次数
1792. 最大平均通过率
1846. 减小和重新排列数组后的最大元素
1833. 雪糕的最大数量
1877. 数组中最大数对和的最小值
1996. 游戏中弱角色的数量
剑指 Offer 45. 把数组排成最小的数
面试题 10.11. 峰与谷

组合问题

https://blog.csdn.net/effective_coder/article/details/8736718

删除

拼接

修改

区间问题(活动安排)

0-1背包问题

image.png
image.png
image.png

分类:

Standard Greedy Algorithms

  1. Activity Selection Problem
  2. Egyptian Fraction
  3. Job Sequencing Problem
  4. Job Sequencing Problem (Using Disjoint Set)
  5. Job Sequencing Problem – Loss Minimization
  6. Job Selection Problem – Loss Minimization Strategy | Set 2
  7. Huffman Coding
  8. Efficient Huffman Coding for sorted input
  9. Huffman Decoding
  10. Water Connection Problem
  11. Policemen catch thieves
  12. Minimum Swaps for Bracket Balancing
  13. Fitting Shelves Problem
  14. Assign Mice to Holes

    Greedy Algorithms in Graphs

  15. Kruskal’s Minimum Spanning Tree

  16. Prim’s Minimum Spanning Tree
  17. Boruvka’s Minimum Spanning Tree
  18. Reverse delete algorithm for MST
  19. Problem Solving for Minimum Spanning Trees (Kruskal’s and Prim’s)
  20. Dijkastra’s Shortest Path Algorithm
  21. Dial’s Algorithm
  22. Dijkstra’s Algorithm for Adjacency List Representation
  23. Prim’s MST for adjacency list representation
  24. Correctness of Greedy Algorithms
  25. Minimum cost to connect all cities
  26. Max Flow Problem Introduction
  27. Number of single cycle components in an undirected graph

    Greedy Algorithms in Operating Systems

  28. First Fit algorithm in Memory Management

  29. Best Fit algorithm in Memory Management
  30. Worst Fit algorithm in Memory Management
  31. Operating System | Program for Next Fit algorithm in Memory Management
  32. Shortest Job First Scheduling
  33. Program for Shortest Job First (SJF) scheduling | Set 2 (Preemptive)
  34. Schedule jobs so that each server gets equal load
  35. Job Scheduling with two jobs allowed at a time
  36. Scheduling priority tasks in limited time and minimizing loss
  37. Program for Optimal Page Replacement Algorithm
  38. Program for Page Replacement Algorithms | Set 1 ( LRU)
  39. Program for Page Replacement Algorithms | Set 2 (FIFO)

    Greedy Algorithms in Arrays

  40. Minimum product subset of an array

  41. Maximum product subset of an array
  42. Maximize array sum after k-negations | Set 1
  43. Maximize array sum after k-negations | Set 2
  44. Maximize the sum of arr[i]*i
  45. Maximum sum of increasing order elements from n arrays
  46. Maximum sum of absolute difference of an array
  47. Maximize sum of consecutive differences in a circular array
  48. Maximum height pyramid from the given array of objects
  49. Partition into two subarrays of lengths k and (N – k) such that the difference of sums is maximum
  50. Minimum sum of product of two arrays
  51. Minimum sum by choosing minimum of pairs from array
  52. Minimum sum of absolute difference of pairs of two arrays
  53. Minimum operations to make GCD of array a multiple of k
  54. Minimum sum of absolute difference of pairs of two arrays
  55. Minimum sum of two numbers formed from digits of an array
  56. Minimum increment/decrement to make array non-Increasing
  57. Making elements of two arrays same with minimum increment/decrement
  58. Minimize sum of product of two arrays with permutation allowed
  59. Sorting array with reverse around middle
  60. Sum of Areas of Rectangles possible for an array
  61. Array element moved by k using single moves
  62. Find if k bookings possible with given arrival and departure times
  63. Lexicographically smallest array after at-most K consecutive swaps
  64. Largest lexicographic array with at-most K consecutive swaps

    Approximate Greedy Algorithms for NP Complete Problems

  65. Set cover problem

  66. Bin Packing Problem
  67. Graph Coloring
  68. K-centers problem
  69. Shortest superstring problem
  70. Travelling Salesman Problem | Set 1 (Naive and Dynamic Programming)
  71. Traveling Salesman Problem | Set 2 (Approximate using MST)
  1. Fractional Knapsack Problem
  2. Minimum number of coins required

    Misc

  3. Split n into maximum composite numbers

  4. Maximum trains for which stoppage can be provided
  5. Buy Maximum Stocks if i stocks can be bought on i-th day
  6. Find the minimum and maximum amount to buy all N candies
  7. Maximum sum possible equal to sum of three stacks
  8. Maximum elements that can be made equal with k updates
  9. Divide cuboid into cubes such that sum of volumes is maximum
  10. Maximum number of customers that can be satisfied with given quantity
  11. Minimum Fibonacci terms with sum equal to K
  12. Divide 1 to n into two groups with minimum sum difference
  13. Minimize cash flow among friends
  14. Minimum rotations to unlock a circular lock
  15. Paper cut into minimum number of squares
  16. Minimum difference between groups of size two
  17. Minimum rooms for m events of n batches with given schedule
  18. Connect n ropes with minimum cost
  19. Minimum Cost to cut a board into squares
  20. Minimum cost to process m tasks where switching costs
  21. Minimum cost to make array size 1 by removing larger of pairs
  22. Minimum cost for acquiring all coins with k extra coins allowed with every coin
  23. Minimum time to finish all jobs with given constraints
  24. Minimum number of Platforms required for a railway/bus station
  25. Minimize the maximum difference between the heights of towers
  26. Minimum increment by k operations to make all elements equal
  27. Minimum edges to reverse to make path from a source to a destination
  28. Find minimum number of currency notes and values that sum to given amount
  29. Minimum initial vertices to traverse whole matrix with given conditions
  30. Find the Largest Cube formed by Deleting minimum Digits from a number
  31. Check if it is possible to survive on Island
  32. Largest palindromic number by permuting digits
  33. Smallest number with sum of digits as N and divisible by 10^N
  34. Find Smallest number with given number of digits and digits sum
  35. Rearrange characters in a string such that no two adjacent are same
  36. Rearrange a string so that all same characters become d distance away
  37. Print a closest string that does not contain adjacent duplicates
  38. Smallest subset with sum greater than all other elements
  39. Lexicographically largest subsequence such that every character occurs at least k times

    Quick Links

  40. Top 20 Greedy Algorithms Interview Questions

  41. ‘Practice Problems’ on Greedy Algorithms
  42. Practice Questions on Huffman Encoding
  43. ‘Quiz’ on Greedy Algorithms