Did I make a fool of myself

5! = 5 * 4 * 3 * 2 * 1 = 120

I think was the exact text, But 5 * 4 = 20 * 3 = 60 * 2 = 120 * 1 = 120

So I agree with the answer
 
However after seaching this site for almost 20 seconds I came up with this
Code:
Public Function Factorial(N As Long) As Long

If N < 0 Then
MsgBox "invalid argument for Factorial"
Exit Function
ElseIf N < 2 Then
Factorial = 1
Exit Function
End If

Factorial = N * Factorial(N-1)
End Function
 
Depends how we write it: -

Code:
Sub TestIt()

    MsgBox Factorial()

End Sub


Function Factorial() As Long
    
    Factorial = 5 * 4 * 3 * 2 * 1 = 120

End Function
 
My answer was with regard to: -

Question Being

Factorial = 5*4*3*2*1 = 120

In post #99

Just having a bit of fun David, it is rather hard to ask a question when someone wants to screw with the answer. :D
 
The big problem is that you cannot take the P**S out of S**T
 
I went to an interview on one occasion and was asked: -

Do you mind if I ask how much you got in your last job?
No.
(Long pause.)
Well, how much did you get in your last job?
Do you mind if I don’t tell you?

I didn’t get the job but it had nothing to do with my ability to do the job.

If an employer has little regard for the privacy of my previous employer then what would they expect from me in my next interview?
 
I share your opinion on that subject. Especially when the salary is to be dicussed at interview.

They have a figure in mind, and so do you.

Lets say it's £40k a year

Interviewer "And what salary are you looking for?"

Interviewee "Err... About £35k " (Really wants more but scared of asking or willing to be agrued down to £30k)

Inteviewer (To themselves) "Hey I will offer him £34k and we save £6k"

Interiewer "Well the highest we had in mind was £34k..."

I always ask them to make the opening gambit. If they ask what I was on in my previous job I always say that it does not have a bearing on this job.
And as my previous employer has a company policy that all ex employees do not divulge such information I have to honour that. If they really want to know then they should contact my previous employer direct.

To me this shows loyalty to my previous employer even if I have left the Company or about to leave. If they wanted such openness about salaries why was their positions salary to be discussed at interview?
 
Quite a number of years ago one of my staff came in with a maths question that was given out a homework from the junior school. I have even set the task to plenty of so called mathamaticians to come up with the FULL solution.

Take a look at the attached spreadsheet for the layout of the question. But basically there are 20 questions numbered 1 - 20 and coincidently the answer to each question is 1 - 20. Therefore the anwer to question 1 is 1, likewise the answer to question 16 = 16. All you have to do is to fill in the mathmatical symbols betwen the numerators so that the question number equals the answer.
Here you go David.

Quite an interesting exercise.
 

Attachments

David.

Yep, and I was almost certain I didn’t have the job as soon as he asked the question.

There was no way I was going to answer that question so I stuck it to him in like kind.
If they have such little regard for my previous employer then they are likely to have little regard for me. The only way I would accept that position was if he apologized for asking the question and I couldn’t see that happening.

Besides, it didn’t really matter. I had already applied for another job and that was the one I wanted. I got that job but, strangely enough, salary was not even mentioned at the time. It wasn’t mentioned for a week or more, I guess when they needed to make up the pays they realised they didn’t have a figure, and only then was I asked to see the branch manager. He asked me how much I was expecting to get paid. I told him I was not particularly concerned but didn’t think the company could pay me much more or much less than what I would get doing a comparable job elsewhere.

So I told him I would leave it up to him to come up with a number, and I was pleasantly surprised.

It was the best job I’ve had, learnt a lot, and the best paid too. I worked for them for 8 years and I think I would still be working for them if they hadn’t pulled out of Australia for financial reasons.

But that was in the eighties and things have changed…

Chris.
 
Here is another angle on the topic even though it is not really related to a job interview but more to a safety induction on an open cut mining site. This happened to me about ten years ago…

Old site safety officer who is just about to retire…
How long have you been working in heavy industry?

Me…
About 40 years.

Safety officer…
Still got ten fingers and ten toes?

Me…
Yep.

Safety officer…
Well it seems you have been doing something right.



What this and my previous post means, and will become more and more obvious over time, is that there should be a mutual respect between interviewer and interviewee.

It is not a one-way street in which either party treats the other dissimilarly.

Chris.
 
And as my previous employer has a company policy that all ex employees do not divulge such information I have to honour that. If they really want to know then they should contact my previous employer direct.
However in the UK when you change jobs your new employer can see from your P45 what you were being paid by your old employer
 
Yes but not untill after you get the job and agreed a salary.
 
Last try lol.

Look I understand your point but here's mine.

They didn't ask for a basic loop. They asked you for the understanding of how a sort array ACTUALLY works. ie. Do you use bubble, insertion etc etc and to have the mechanical understanding of that accessible instantly without IDE and then code it.

If you can't do a For i as integer = 0 to x.count -1 in notepad, then I agree but that wasn't what was asked for.

I don't need a refresher on a basic loop because yes, for my sins, I have to do that everyday. But I quickly had to google the insertion method for sorting to refresh myself of the mechanics of it, from there I was good to go.

My brain couldn't pull the insertion method of sorting because it was 'archived' long ago. If I had to keep re-coding that algorithm daily instead of encapsulating it within a single method I could have answered the question but I wouldn't have got anything done in the past x amount of years.

It was a deliberately tough question to cut down the numbers. It would have culled me but then I don't care to memorize all the mechanics of every single algorithm ever written for the reasons I've stated.

For the Factorial question - he did pretty much ask for a basic loop.

I dont think he wanted you to remember it - like it would be pointless asking the bucket question - if someone had comitted it to memory - but couldn't answer a variant with differant number attached.

Memorizing it was not the point - having the nouse to work out the answer was.

As I say I have seen a good few people - in well paid jobs , with qualifications, technologies previuos relevent experience a plenty on the CV - working as programmers, DBAs etc etc - they would have been culled by these questions even if they had a day , and maybe even the tinterweb too.
(Mutiple choice questions , and resits of Microsoft certifications are a dangerous thing)
Perhaps culling them was the point.

How else would you suggest finding out such candidates?

I think , to have good go at pseudocoding almost any function you use would be a good idea.
 
Last edited:
Well I think I would have told him to get lost!

I don’t think I would have put it quite that bluntly, but that’s the general attitude I would have taken. You were attending an interview for an MS access job, not to see if you would be any good in the pub quiz team!

Let me ask you an intelligence question I once heard:
A small boy he lives in a block of flats, when he goes to school in the morning he takes the lift, when he comes home at night, he takes the lift and stops at the fourth floor, then takes to the stairs to complete his journey home. Why?

What's a flat and what's a lift?
A lift sounds like an elevator.
And a flat sounds like a one story building.
 
A flat is a dwelling place that is all on one level (most of the time) that is part of a larger house of multiple occupancy. High rise multi story appartments can also be ferred to as Flats. But the terminaology is insignificant if you have some semblence f what they are talking about.
 
dwelling place that is all on one level

Yep that's about it..

images


Lift = Elevator
 

Users who are viewing this thread

Back
Top Bottom