I have gone through one of the books of algorithm and I have found a problem named Hiring Problem. Here is the situation
I have to conduct a interview for hiring the candidates for my company.
I am personally not able to conduct the interview as I have failed to do so.So I have hired a employment agency for hiring the candidate.The agency will send me each day a candidate among n candidates. Algo for this will be
**Algo Hiring Candidate(n)**
best=0 // The candidate with the least quality
for i=1 to n
If the candidate is better than the best valued candidate we should hire him
Best=candidate[i]
return i;
But here,interview cost will be always calculated as we have to take the interview of each candidate.So we have to concentrate on how to minimize the hiring cost.
Total cost will be O(interview cost and hiring cost)
I have gone through many observations such as the agency will send the candidate randomly and in the worst case we have to hire all the candidates,then the hiring cost will be higher as each candidate come in a order of increasing quality.
But practically this is not possible as it is never possible that all the candidates will come always in increasing order.They should come in a random order.
I have taken many observations but I am really not able to minimize the hiring cost.
Can someone help me out through this problem.
Hoping for a true response.