@Don:

The solution looks good...
I can see that the greedy choice property is holding.. and its optimal 
too...

max (j+a[J]) maximizing is leading us to the farthest possible position, 

but.. in the beginning.. i thought.. this will have probs with 0's
but.. couldn't come up an example, for which ur approach fail and there's 
soultion for it.


-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/eRjd3qebYh4J.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to