Skip to main content

Interview question #1

Since I have been asked to interview experienced PHP programmers, I was preparing few interview questions. I came to know, most of the people ask questions found in the Internet; most of them are like "What is the function used to connect MySQL DB in PHP". Personally, I don't like these types of questions; I'd thought the person must apply ideas what he was taught in colleges--finally I came out with one question:

A product vendor has Quantity Vs. Price data like
1 -> Rs. 50
2 -> Rs. 95
3 -> Rs. 140
.... like upto 1 million data. He wants a system, which gives the price when the quantity is provided. For example, if you provide the quantity value as 2, then it should provide Rs. 95. How this system can be designed?

As expected, all the people said about using database tables and quering on quantity. I have asked them to find out a system which doesn't use databases--provided the accuracy of the system may not be 100%--it may give at least 90% accuracy. To my surprise, none of the people I have interviewed yet didn't provide any solutions.

I must find out few other questions especially for a post of "Web Application Developer".

Comments

Anonymous said…
amount = (45 * quantity ) + 5
For comment#1:Good, if the data are just 3. What if you have about 1 million data? What is the procedure?
Anonymous said…
use Chi Square
For comment#3:You've exceeded my expectation:-) I'd rather expect even a simple keyword. May I know your name?
Anonymous said…
Is it possible to use an associative array(performance?)? - like

$product[$price] = $quantity;
Online Pharmacy said…
This comment has been removed by a blog administrator.
Sindhuja said…
$amount = (45 * ($quantity -1)) + 50

Popular posts from this blog

Humble Award - Dr. A.N. Sreevatsan

Dr. A.N. Sreevatsan , ENT specialist located in Adyar, Chennai is one of the gems available in medicines. No assistants in his consulting room and he'd take at least 15mins for every patients. So far I have referred many and all are happy with his approach. Every wannabe doctor should visit him personally to understand his approach. I wish him to be more famous than now. Update (2010-11-21) : Added link to Google Map Keywords : Sreevatsan, Srivatsan, ENT, Adyar, Chennai, Hospital, Doctor

Top Indian web startups

Disclaimer: This list contains some of our team's projects Sites that are useful and usable erail.in - created by a single person and serves useful to quickly find availability in Indian trains ClearTrip - seems to be inspired by many other sites like Vayama , but able to get better UI RediffMail - speed is the big boost Myntra - good idea, but poor UI redBus - good idea, but poor UI and execution Sites from The Times Group are also of good idea, but poorly executed/architected. They clearly try and target the web startup "gap" Sites that are innovative (world's first/never seen before kind) SocialAV - World's first and only antivirus building community (by our team) CSSilize - World's first and only project management tool for slicing works (by our team) jobreapr - World's first and only fixed price job search engine (by our team)

Think Different - truth and creative people behind

Here's to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes. The ones who see things differently. They're not fond of rules, and they have no respect for the status quo. You can quote them, disagree with them, glorify and vilify them. About the only thing you can't do is ignore them because they change things. They push the human race forward. And while some may see them as crazy, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do. --  Think different, Apple's TV commercial Kids of Mac toys often attribute everything to Steve Jobs. But, I recently happened to read the people and story behind the inspiring "Think Different" ad . I think, everyone must read it--to be inspired.