as per my analisys

   sort elements diagonally in the 2d arry.
          we can define diagonals by a[0,i] to a[i,0]  is
a[0,i],a[1,i-1],a[2,i-2],...... a[i-1,1],a[i,0],   sort the elements
          if i > col_size  then diagonal  is a[0,i]  is define as
a[0,i],a[1,i-1],a[2,i-2]...a[x,i-x] where i-x < col_size,

now print the arry normally .. it will print sorted output.


--paramesh



On Tue, Feb 8, 2011 at 6:54 PM, arpit  busy in novels
<[email protected]> wrote:
> take   1st as 763   2nd as 753     merge them k[]=76533
>
> take 42 as 1st 42 as 2nd   merge as l[] 422
> now merge k & l as                                   7654332      add 2  ie
> a[00] always lowest
>
> On Tue, Feb 8, 2011 at 5:47 PM, September5th <[email protected]> wrote:
>>
>> How do you handle this condition???
>>
>> 1 2 3
>> 2 4 5
>> 3 6 7
>>
>> 3 is smaller than 4~
>>
>> On Feb 8, 2:48 am, arpit  busy in novels
>> <[email protected]> wrote:
>> > after a bit analysis i stick strongly to my soln :::::
>> >
>> > 0 1 2 3                        since element of last row & column will
>> > always be greater than rest of array
>> > 2 2 3 4
>> > 3 3 4 5
>> > 4 5 6 7                      take   7654 as 1st   & 7543 as 2nd   merge
>> > them
>> > as k[]
>> >
>> > array reduced to
>> > 0 1 2
>> > 2 2 3
>> > 3 3 4                          take  433  as 1st    432 as 2nd
>> >      merge them as l[]
>> >
>> > 0 1
>> > 2 2                 22  & 21   as m[]
>> >
>> > merge all k[] m[] l[]      add least element always a[0,0]
>> >  ..........................................hope this is clear least on
>> > my
>> > side
>>
>> --
>> 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.
>>
>
>
>
> --
> Arpit Bhatnagar
> (MNIT JAIPUR)
>
> --
> 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.
>

-- 
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.

Reply via email to