[Ilugc] [OT] Need programming puzzles

  • From: rajagopal.n@xxxxxxxxx (Rajagopal Natarajan)
  • Date: Tue Jan 9 15:22:25 2007

On 1/8/07, Binand Sethumadhavan <binand@xxxxxxxxx> wrote:


[quote]
Let A be an array of n elements.Procedure which takes this array as i/p
and produce a matrix which shuold be spiral in nature.

if A = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]

7     8     9    10
6     1     2    11
5     4     3    12
16  15    14   13

if n is not a full square then dummy elements can be included to make
the o/p matrix complete.
[/quote]


Trilogy placement test question.

-- 
N. Rajagopal,
Visit me at http://www.rajagopal.tk

Other related posts: