473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

problem named walk

there is a person who is standing in the middle of a square of size
n*n.he can walk
sideways or cross,i.e. from a block (i,j ), he can go to
(i+1,j+1),(i-1,j-1),(i+1,j),(i-1,j)
(i,j+1),(i,j-1),(i+1,j-1),(i-1,j+1).He cannot go if he reaches the end
of the block.
Show a path by which he can cover the whole square.

Apr 2 '06 #1
5 1433
rajat ha scritto:

...


Smells like homework.

--
Linux Registered User #334216
Get FireFox! >> http://www.spreadfirefox.com/?q=affiliates&id=48183&t=1
Staff >> http://www.debianizzati.org <<
Apr 2 '06 #2
rajat wrote:
there is a person who is standing in the middle of a square of size
n*n.he can walk
sideways or cross,i.e. from a block (i,j ), he can go to
(i+1,j+1),(i-1,j-1),(i+1,j),(i-1,j)
(i,j+1),(i,j-1),(i+1,j-1),(i-1,j+1).He cannot go if he reaches the end
of the block.
Show a path by which he can cover the whole square.


No. The reason I won't? Because I'm not in school and don't have to do
homework. You apparently are. Give it your best shot, and post the
trial here. We will help you with the code.

If you don't even have an algorithm yet, you'll need to post elsewhere,
comp.programming perhaps.

Brian

--
Please quote enough of the previous message for context. To do so from
Google, click "show options" and use the Reply shown in the expanded
header.
Apr 2 '06 #3
rajat wrote:
there is a person who is standing in the middle of a square of size
n*n.he can walk
sideways or cross,i.e. from a block (i,j ), he can go to
(i+1,j+1),(i-1,j-1),(i+1,j),(i-1,j)
(i,j+1),(i,j-1),(i+1,j-1),(i-1,j+1).He cannot go if he reaches the end
of the block.
Show a path by which he can cover the whole square.


Right, I've drawn a picture. Now, do you have a C question?

If you want me to do your homework for you then slip a brown envelope
with 200UKP in used fivers under my door and your instructors email
address. It's 500UKP if you want me to send the answer to you instead of
your instructor.

Alternatively, try to do your homework, read the URL in my sig, and post
here with any C questions you have.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
Apr 2 '06 #4
Flash Gordon ha scritto:

...

Right, I've drawn a picture. Now, do you have a C question?

If you want me to do your homework for you then slip a brown envelope
with 200UKP in used fivers under my door and your instructors email
address. It's 500UKP if you want me to send the answer to you instead of
your instructor.

...


Lol, I never thought it could become a business :)

David

--
Linux Registered User #334216
Get FireFox! >> http://www.spreadfirefox.com/?q=affiliates&id=48183&t=1
Staff >> http://www.debianizzati.org <<
Apr 2 '06 #5
David Paleino <d.*******@gmail.com> writes:
Flash Gordon ha scritto:

...

Right, I've drawn a picture. Now, do you have a C question?

If you want me to do your homework for you then slip a brown envelope
with 200UKP in used fivers under my door and your instructors email
address. It's 500UKP if you want me to send the answer to you instead of
your instructor.

...


Lol, I never thought it could become a business :)


You're kidding, right? I won't post (or bother to rediscover) any URIs
here, but I've seen several websites dedicated to doing exactly that
for a business. Specifically for C, in fact.

I've also seen several free sites with boilerpate essays on various topics.

--
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/
Apr 2 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gyoung-Yoon Noh | last post by:
I've written Unix's find-like function using recursive os.listdir() call and generator expression. It seems that error happens in generator expression. Below codes do not work. walk.next()...
3
by: Roger Meike | last post by:
Hello, I have a customer who is having problems running one of our applications. It appears that it is failing on a call to GetProcessByName. The error is "Process performance counter is...
117
by: Peter Olcott | last post by:
www.halting-problem.com
1
by: Joy | last post by:
Hi, I have a problem in data structures which most of the people find a homework but that it is and I am sorry for that. I am stuck in this one .Please try to help me , just provide me the...
2
by: Xah Lee | last post by:
Python Doc Problem Example: os.system Xah Lee, 2005-09 today i'm trying to use Python to call shell commands. e.g. in Perl something like output=qx(ls) in Python i quickly located the...
0
by: Gary Paris | last post by:
It seems that you have a definite problem in life. The way to solve your problem is to follow these simple steps. First take a bootable floppy in reboot your computer. At the A: Prompt, type...
7
by: KraftDiner | last post by:
The os.walk function walks the operating systems directory tree. This seems to work, but I don't quite understand the tupple that is returned... Can someone explain please? for root, dirs,...
2
by: Fabian Braennstroem | last post by:
Hi, I would like to use re to search for lines in a files with the word "README_x.org", where x is any number. E.g. the structure would look like this: ] I tried to use these kind of...
5
bluechimera
by: bluechimera | last post by:
Of course this isn't the whole program.... but it is a rather large slice of code. Yes I am in college, I am not asking for someone to do this for me.. I think that is rather stupid... you don't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.