NEWBIE here!

PLease please please suggest me a good way to learn greedy technique other than jumping directly into questions and by seeing the editorials if failed…
I tried unacademy but it was not so comfortable for me…please give a proper roadmap
Also is greedy method is a part of DP ?for greedy do i need to read DP first?
also suggest few yt channels or resources for DP

1 Like

You can start off with Hackerrank. It’s one of the Best places to learn Concepts.
Start solving easier problems first (with more success rate).

Nope, Dynamic Programming and Greedy are bit similar (Minimisation or Maximisation), but DP is more advanced when compared to Greedy.

To learn DP, you should have an idea of Greedy Techniques.
As you’re a beginner, I suggest you to solve the following first, by learning the concept.

Under Greedy Algorithms

  1. Fractional Knapsack Problem
  2. Job Sequencing with Dead lines.

Under Dynamic Programming

  1. Longest Common Sub-sequence.
  2. Coin Change
  3. Finding Path from top-left to bottom-right corner in a Rectangular Maze.

You’ll pick up as you solve problems.
Cheers :grinning:

ok so the roadmap is to first do these topics mentioned under greedy?right?
also i do need to know that how to build logics using greedy?I am getting stucked in cf and cc or ladder problems on greedy…i cant get the right greedy logic method

Yes, initially, it will not be that easy to build logic. Keep solving problems. Also, if you have tried for more than an hour, it’s enough, just go through the editorial and find the logic. It’s not wrong to see editorial. Everyone is learning. If you wish to try for some more time, you can. Never try too easy or too hard questions. Try those that are just above your level. Sort the challenges in the descending order of number of successful submissions and solve in that order.