[image: Inline image 1]
If u look at the pattern closely...and count the number of tiles vertically
from left...the pattern followed is

2,3,4,4,3,2
and 2+3+4+4+3+2=18

so for any a,b,c...u will need an array of size A[b+c-1]
now start populating the array from start and end simultaneously and
increment the value by 1 after each iteration till u reach the maximum
allowed value ,i,e (a+b-1)  which is (2+3-1) =4 in above case...now
populate rest of the array with (a+b-1)
so, for a=2,b=3,c=4;
(b+c-1)=6;
(a+b-1)=4;
A[6]=[2,3,4,4,3,2]
summing up gives 18
I  think this should give u the correct output...please let me know if i am
wrong here.

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

<<image.png>>

Reply via email to