this is from one of the links...
8. How many points are there on the globe where by walking one mile south,
one mile east and one mile north you reach the place where you started.
I have no idea about this one... Is it serious?
this is from one of the links...
8. How many points are there on the globe where by walking one mile south,
one mile east and one mile north you reach the place where you started.
I have no idea about this one... Is it serious?
Aye. If you think a little bit, you'll find one of them. If you think harder, you'll find an infinite number of them.
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
erm, i can only think of one. How can you have an infinite number of them?Originally Posted by pianorain
I know what you are trying to get at but using typedef isn't required for a C struct. You'll just have to use struct name instead of just nameYou need to use the typedef keyword in conjunction with declaration of a C struct and you don't with a C++ struct.
The easy one is the North Pole. Go one mile south, one mile east, one mile north, and you're right back to where you started. You can find the others near the South Pole. Find a circle centered on the South Pole that has the circumference of a mile. Pick any point one mile north of that circle, and go. Additionally, you can find a circle centered on the South Pole that has the circumference of a half-mile, quarter-mile, etc. Starting one mile north of those circles will yield the same results.Originally Posted by Perspective
edit: Concerning the last part, you're not limited to circles with circumferences that are 1/2^n of a mile. Any circumference that is 1/x of a mile is sufficient.
Last edited by pianorain; 02-24-2005 at 03:09 PM.
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein
ohhhh, clever. I hadnt heard that one before.
For all those who applied for a programming job :
Which would help you most to get the job : your personal portfolio , your experience (like worked with few APIs\systems ..etc) or the job interview?
My Tutorials :
- Bad programming practices in : C
- C\C++ Tips
(constrcutive criticism is very welcome)
- Brain Cell
I cant visualize it Can you explain better please?Originally Posted by pianorain
Originally Posted by Brain Cell
EXPERIENCE beats everything else hands down.
some entropy with that sink? entropysink.com
there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka
http://www.google.com/search?q=walki...+Feeling+LuckyOriginally Posted by Maragato
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
If you had read it instead of just posting you would notice there is no explanation about it. Just ppl saying it is right.Originally Posted by Dave_Sinkula
I did read it -- did you?Originally Posted by MaragatoAnd please click the drawing.solution: one mile south aha:
problem: how many places are there on the earth that one could walk one mile south, then one mile east, then one mile north and end up in the same spot? to be precise, let's assume the earth is a solid smooth sphere, so oceans and mountains and other such things do not exist. you can start at any point on the sphere and walk in any direction you like. think you've figured it out? i'll tell you now, there is more than one. in fact, there are more than two. also be advised that walking north from the north pole (or south from the south pole) is illogical and therefore does not enter into the problem. all normal assumptions about directions will be used.
there are no tricks involved with this question. it just forces you to really think about the problem to come up with all the solutions.
solution:
well the north pole is one such place.
then somewhere near the south pole such that when you walk one mile south you are at the point on the earth where the circumference is 1. that way when you walk 1 mile east, you end up back at the same point. and of course one mile north from there puts you back where you started. here is a drawing courtesy of jy. there may or may not be such a place in the northern hemisphere where walking a mile south puts you at the 1 mile circumference point on the earth.
i'm no geometry sphere expert, so someone will have to let me know if that is physically possible (i.e. i tend to think that if you walk n units south from any point on the northern part of a sphere, other than the north pole, it is impossible for the circumference to be n or less than n, but who knows?)
finally there are actually an infinite number of points. if we consider the case before where we went to the point with a circumference of 1, why not go to the point with a circumference of 1/2. then when you go a mile east, you loop around twice, and end up in the same spot. this holds true for 1/3, 1/4, 1/5, ... 1/n, etc.
** edited by sean_mackrory **
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
Experience was definitely the biggest one but they told me after that is established, all they are really doing is giving you the "a-hole" test to make sure you can work with large groups. (at least companies working on team projects)Originally Posted by Brain Cell
Thanks a lot sean now I got it with the drawing, man I will never get a job this way!
Here's one from an interview I had:
Given a node in a singly linked list, with no other knowledge of the list (i.e. not knowing the head), how would you remove that node?
Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah
You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie