Skip to main content

Guidelines

Greedy algorithms are probably one of the hardest to get right but below are few tips:

  • How does sorting affect the problem input (e.g. intervals) and is it enabling us to have a quicker computation/step
  • Defining contradiction as a proof for greedy solution Gas Station
  • Can we use local maximum/minimum without calculating the global one to come up with a solution?
  • Are some element clearly better for the subresult than others, can you prove that the subresult will drive the end result?
  • Define a way to discard elements when the arragment is no longer valid Course Schedule III