Click here to Skip to main content
15,434,147 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 6:32
Memberharold aptroot26-Jun-20 6:32 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 9:06
MemberMember 1487381426-Jun-20 9:06 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 9:27
Memberharold aptroot26-Jun-20 9:27 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 10:30
MemberMember 1487381426-Jun-20 10:30 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 11:05
Memberharold aptroot26-Jun-20 11:05 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 11:20
MemberMember 1487381426-Jun-20 11:20 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 11:56
Memberharold aptroot26-Jun-20 11:56 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 12:23
MemberMember 1487381426-Jun-20 12:23 
But I'm not sure how I should treat the data in this case.

Let's suppose our sum of job times is S = 100.

We have k = 3 assignees.

We start by calling Algorithm1(100) == TRUE of course

Now we are calling Algorithm1(50) == TRUE

Now Algorithm1(25) == FALSE
So in this case we want to check the middle between [25, 50], so we can get that by calculating 0.5(*25 + 25*2), so that now we call Algorithm1(38) which returns TRUE

But what now? We would divide again 38 by 2 and go out of the range [25, 50].

See the problem?
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
harold aptroot26-Jun-20 12:33
Memberharold aptroot26-Jun-20 12:33 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 12:59
MemberMember 1487381426-Jun-20 12:59 
AnswerRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Gerry Schmitz26-Jun-20 5:47
mveGerry Schmitz26-Jun-20 5:47 
GeneralRe: Dynamic Programming / Greedy algorithm - Best time with constraints Pin
Member 1487381426-Jun-20 9:10
MemberMember 1487381426-Jun-20 9:10 
QuestionImplementation of the hash function in a HashMap Pin
terrybogard425-Jun-20 22:07
Memberterrybogard425-Jun-20 22:07 
AnswerRe: Implementation of the hash function in a HashMap Pin
Alan Balkany8-Sep-20 6:16
MemberAlan Balkany8-Sep-20 6:16 
QuestionAlgorithms work Pin
Member 1484318525-May-20 4:50
MemberMember 1484318525-May-20 4:50 
AnswerRe: Algorithms work Pin
Dave Kreskowiak25-May-20 4:58
mveDave Kreskowiak25-May-20 4:58 
AnswerRe: Algorithms work Pin
Eddy Vluggen25-May-20 10:28
professionalEddy Vluggen25-May-20 10:28 
GeneralRe: Algorithms work Pin
Richard Deeming27-May-20 0:25
mveRichard Deeming27-May-20 0:25 
GeneralRe: Algorithms work Pin
Eddy Vluggen27-May-20 8:59
professionalEddy Vluggen27-May-20 8:59 
AnswerRe: Algorithms work Pin
ZurdoDev27-May-20 9:46
professionalZurdoDev27-May-20 9:46 
GeneralRe: Algorithms work Pin
Member 798912227-May-20 10:13
MemberMember 798912227-May-20 10:13 
GeneralRe: Algorithms work Pin
Eddy Vluggen27-May-20 10:17
professionalEddy Vluggen27-May-20 10:17 
GeneralRe: Algorithms work Pin
Eddy Vluggen27-May-20 10:14
professionalEddy Vluggen27-May-20 10:14 
AnswerRe: Algorithms work Pin
Patrice T28-May-20 22:20
mvePatrice T28-May-20 22:20 
Questionalgorithm Pin
Member 1483481216-May-20 23:57
MemberMember 1483481216-May-20 23:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.