You are given two arrays A [n] and B[m] find the smallest window in A
such that it
contains all elements of B. i.e. find a position [g,h] such that
A[g.....k] contains all
elements of B[m]
For example,
_______________________________________________
index = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11, 12, 13, 14, 15, 16
_______________________________________________
....A[]= {3, 1, 5, 9, 3, 2, 5, 4, 3, 4, 5, ..5, ..11, .4, .0, ..11,
99}
....B[]= {5, 3, 4,11, 4}
_______________________________________________
The position of smallest window is [ 6, 8, 9, 12, 13 ].-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
