# Thread: Frequent Job Interviewing Questions

1. 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.

2. 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.

3. Originally Posted by pianorain
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.
erm, i can only think of one. How can you have an infinite number of them?

4. You need to use the typedef keyword in conjunction with declaration of a C struct and you don't with a C++ struct.
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 name

5. Originally Posted by Perspective
erm, i can only think of one. How can you have an infinite number of them?
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.

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.

6. ohhhh, clever. I hadnt heard that one before.

7. 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?

8. Originally Posted by pianorain
The easy one is the North Pole.
I cant visualize it Can you explain better please?

9. Originally Posted by Brain Cell
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?

EXPERIENCE beats everything else hands down.

10. Originally Posted by Maragato
I cant visualize it Can you explain better please?

11. Originally Posted by Dave_Sinkula
If you had read it instead of just posting you would notice there is no explanation about it. Just ppl saying it is right.

12. Originally Posted by Maragato
If you had read it instead of just posting you would notice there is no explanation about it. Just ppl saying it is right.
I did read it -- did you?
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 **

13. Originally Posted by Brain Cell
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?
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)

14. Thanks a lot sean now I got it with the drawing, man I will never get a job this way!

15. 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?