sameer.careercup
BAN USER- 0of 0 votes
AnswersGiven a paragraph of text, write a program to find the first shortest sub-segment that contains each of the given k words at least once. A segment is said to be shorter than other if it contains less number of words
- sameer.careercup in India| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm - 1of 1 vote
Answersdivide a given array into two subarray (not necessary to be continuous) such that difference between sum of both array is minimum. Required was recursive code for this. tried solving using idea from min coin change problem was couldn't.
- sameer.careercup in India| Report Duplicate | Flag | PURGE
Amazon Developer Program Engineer Algorithm
what if you dont have array size as 98. i mean to say what if array has duplicate elements too.
- sameer.careercup January 26, 2014can anybody explain this question.... m not getting wot exactly "importance" is....plz somebody thro some light on this q.....
thanks
Hi nice solution. Can u plz help me in understanding this q in more better way. m jst confuse abt edge cases. wot will be ans if 1. all zero. 2. all negetive. 3. all continous- 1,2,3,4,5 like this.
thanks
dint get the logic can u plz explain
- sameer.careercup December 29, 2012
this seems it will return first always i need smallest subpara in the whole. hope i am able to clarify.
- sameer.careercup April 01, 2014