Closed shailja2727 closed 1 year ago
@Sulagna-Dutta-Roy Please check and tell if there's a change needed .I have added the code
@Sulagna-Dutta-Roy Ma'am made a folder in Algorithm and added the file.Please Check and tell if there is a change needed.
Hi Ma'am, I just wanted to know the contribution I did ..how will I add it in swoc 23
On Tue, 17 Jan 2023, 11:52 am Sulagna Dutta Roy, @.***> wrote:
Merged #113 https://github.com/WeBeginners-Community/DocBook/pull/113 into master.
— Reply to this email directly, view it on GitHub https://github.com/WeBeginners-Community/DocBook/pull/113#event-8242038945, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXUFEGORHJBRTSCDXYUURG3WSY3D7ANCNFSM6AAAAAAT3V67VQ . You are receiving this because you authored the thread.Message ID: @.***>
You need to submit this PR link in Devfolio of SWOC
Ok ma'am Thank you
On Mon, 23 Jan 2023, 2:45 am Sulagna Dutta Roy, @.***> wrote:
You need to submit this PR link in Devfolio of SWOC
— Reply to this email directly, view it on GitHub https://github.com/WeBeginners-Community/DocBook/pull/113#issuecomment-1399610582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXUFEGPTJWL6HXL4MHWXXBDWTWPQ5ANCNFSM6AAAAAAT3V67VQ . You are receiving this because you authored the thread.Message ID: @.***>
Description
It is classic Greedy Problem .In activity selection problem we always pick the next activity whose finish time is the least among the remaining activities and the start time is more than or equal to the finish time of the previously selected activity. We can sort the activities according to their finishing time so that we always consider the next activity as the minimum finishing time activity Steps: i)Sort the activities according to their finishing time ii)Select the first activity from the sorted array and print it ii)Do the following for the remaining activities in the sorted array If the start time of this activity is greater than or equal to the finish time of the previously selected activity then select this activity and print it
Fixes: #111 Issue No. #111
Type of change
Checklist:
ATTACH SCREEN-SHOTS / DEPLOYMENT LINK