About Me

Saturday, October 27, 2012

Find All subsubsequence of size r in given array of length n

2 comments:

  1. Your solution does not find sub-arrays of size r. It finds all sub-sequences of size r. Sub-arrays are contiguous, which sub-sequences are not.

    Given an array of size 3 there can be n-r+1 such sub-arrays.

    n=3, r=2, A = [1, 2, 3]
    all possible subarrays of size r = {[1,2], [2,3]}

    ReplyDelete
  2. @anon , thanks for correcting , i have updated it , keep it up !!!

    ReplyDelete

Hi thanks , we will get back to you shortly !!!