CrazyEngineers
  • Problem in algorithm...

    sushant005

    sushant005

    @sushant005-tyt4WK
    Updated: Oct 23, 2024
    Views: 890
    Can any one have better idea about the greedy aproach and dynamic programming in algorithm and also give the link from where we find ideas about design technique of algorithm.....



    😁
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Manish Goyal

    MemberMar 6, 2010

    Greedy approach means to choose best among all the possible solutions
    for eg if we consider a knapsack problem
    we have a knapsack of capacity 20kg
    and 3 diamonds
    1 diamond =cost 4 crore, weight 20 kg
    2 diamond =cost 3 crore ,weight 15 kg
    3 diamond =cost 2 crore weight 10 kg
    then According to greedy approach You will go for 1st diamond of 20 kg

    According to dynamic programming,,you will choose best solution by storing all the possible solution in a table and using that you will select best solution

    Of both above mentioned approaches dynamic programming is best for finding optimal solution..
    for further knowledge i will recommend you to go for "Introduction to algorithms "By Kormen
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register