- Algorithms in C++(3rd edition) by Robert Segewick.
- C++ Primer (4th edition) by Stanley B.Lippman, Josae Lajoie, Barbra, E. Moo.
- C++ How to Program (5th edition) by P.J. Deitel.
- Computer Networks (3rd edition) by Andrew S. Tanenbaum.
- Computer Systems A Programmer's Perspective By Randal E. Bryant
References of Computer Programming
Posted at
5/17/2010 03:06:00 PM
Spiral Numbers
Posted at
5/16/2010 11:56:00 AM
Print spiral number array like this:
7 8 9 10
6 1 2 11
5 4 3 12
Given coordinates of a point, find the corresponding number residing on it.
There are many solutions to this problem. For example, find the number by looking for the relation(function) between the number and its coordinates. The code below solves the problem without using such kind of relation. Of course, the cost is the increase of running time.
7 8 9 10
6 1 2 11
5 4 3 12
Given coordinates of a point, find the corresponding number residing on it.
There are many solutions to this problem. For example, find the number by looking for the relation(function) between the number and its coordinates. The code below solves the problem without using such kind of relation. Of course, the cost is the increase of running time.
Subscribe to:
Posts (Atom)