Folding algorithm help.

Ali Çehreli acehreli at yahoo.com
Mon Mar 18 15:31:19 PDT 2013


On 03/18/2013 02:20 PM, rookie wrote:
 > Hi,
 >
 > I was trying to do a folding algorithm in D and just got stuck on how to
 > approach the problem - I must be missing something (math).
 >
 > Given the following:
 >
 >   2   1 - Both folds are from Left to Right - 1 is the fist fold
 >   V   V
 > 1 | 2 | 3
 > --------- - 3 Bottom to Up
 > 4 | 5 | 6
 >
 > result
 >
 > 6 | 5 | 4
 > -----------
 > 1 | 2 | 3

I have absolulety no idea what this is about but I am brave enough to 
offer a correction. :) According to my nil understanding the result 
should be the following:

6 | 4 | 5
-----------
3 | 1 | 2

Ali



More information about the Digitalmars-d-learn mailing list