How is E(s2) is calculated? Why E(S2)+1
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
+919966006652
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time f(i).
Sort n
Input: n meetings
A meeting e(i) has start time s(i) and finish time f(i).
Sort n events based on there finish time f(i)
Say sorted meeting(based on finishing time) are:
e1,e2,e3,e4,...en
E(t): denotes the maximum no of meetings conducted where 0 = time = t.
E(f1) = e1
E(f2) = max(E(s2) + 1),
what are f1, f2, f3,...?
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time f(i).
Sort n events based on there finish time f(i)
Say sorted meeting(based on finishing time) are:
e1,e2,e3,e4,...en
sorry.
did not go thru it thoroughly earlier.
got it now.
On Feb 9, 7:35 pm, Tushar Bindal tushicom...@gmail.com wrote:
what are f1, f2, f3,...?
On Wed, Feb 9, 2011 at 5:05 PM, Ujjwal Raj ujjwal@gmail.com wrote:
Input: n meetings
A meeting e(i) has start time s(i) and finish time
didn't quite get it, can you please elaborate.
thanks
On Feb 8, 10:38 pm, Ujjwal Raj ujjwal@gmail.com wrote:
Use dynamic programming:
1) Sort the events in order of finishing time.
f1, f2, f3, f4, ... fn
E(fn) = E(sn) + 1;
Solve the above recursion
sn is start time of event n
On Wed,