Re: [algogeeks] Print all possible valid set of given numer

2012-09-09 Thread bharat b
@pritpal : even if 0 is part of number .. we don't usually write any positive number starts with 0 right ... On Sun, Sep 9, 2012 at 9:47 PM, Pritpal S wrote: > @Atul, Bharat : it might be needed if 0 is the part of original number. > > > On Fri, Sep 7, 2012 at 1:28 AM, atul anand wrote: > >> cor

Re: [algogeeks] Print all possible valid set of given numer

2012-09-09 Thread Pritpal S
@Atul, Bharat : it might be needed if 0 is the part of original number. On Fri, Sep 7, 2012 at 1:28 AM, atul anand wrote: > correct... > > On 9/6/12, bharat b wrote: > > no need to look for 3 or above digits .. > > > > On Thu, Aug 23, 2012 at 11:11 AM, atul anand > > wrote: > > > >> divide numb

Re: [algogeeks] Print all possible valid set of given numer

2012-09-06 Thread atul anand
correct... On 9/6/12, bharat b wrote: > no need to look for 3 or above digits .. > > On Thu, Aug 23, 2012 at 11:11 AM, atul anand > wrote: > >> divide number into digit form and save to arr[] >> input=1234 >> formed arr[]={1,2,3,4}; >> print elements for arr[]; >> >> now make set of 2 , 3, 4, >>

Re: [algogeeks] Print all possible valid set of given numer

2012-09-06 Thread bharat b
no need to look for 3 or above digits .. On Thu, Aug 23, 2012 at 11:11 AM, atul anand wrote: > divide number into digit form and save to arr[] > input=1234 > formed arr[]={1,2,3,4}; > print elements for arr[]; > > now make set of 2 , 3, 4, > i.e > when i=2; > we get > *12*,3,4 > 1,*23*,4 > 1,2,*3

Re: [algogeeks] Print all possible valid set of given numer

2012-08-22 Thread atul anand
divide number into digit form and save to arr[] input=1234 formed arr[]={1,2,3,4}; print elements for arr[]; now make set of 2 , 3, 4, i.e when i=2; we get *12*,3,4 1,*23*,4 1,2,*34* i=3 *123*,4 1,*234* i=4 *1234* On Wed, Aug 22, 2012 at 6:34 PM, zeroByZero wrote: > A set will be call valid if

[algogeeks] Print all possible valid set of given numer

2012-08-22 Thread zeroByZero
A set will be call valid if all number can be represent as a alphabet (ie number should be less than or equal to 26) . Example : given number is 1234 then 1) {1,2,3,4} - valid ans 2){12,3,4} - Valid 3){1,23,4} -Valid 4){1,2,34} -not valid 5){123,4} - not valid 6){1234} not valid So for given numbe