Interview Question for Software Engineer / Developers


Country: India
Interview Type: Written Test




Comment hidden because of low score. Click to expand.
1
of 1 vote

Consider each hotel as struct of 5 attributres
struct hotel
{
	int star;
	int regular_weekdays;
	int regular_weekends;
	int rewardee_weekdays;
	int rewardee_weekends;
};
Now check each hotel and maintain the lowest cost hotel. In case of tie with the lowest maitained hotel check if the current hotel's star is more thhan the maintained one, if it is then the replace the maintained hotel with current hotel.

- maverick October 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

continue to the above problem;
Each hotel has specific rates for weekend and weekdays. x charges $100 for regular customers on weekdays and $120 on weekends While it is $90 for rewardee on weekdays and $95 on weekends. While z charges $195 for regular customers on weekdays and $150 on weekends. While its $120 for rewardee on weekdays and $90 on weekends. Now when the customer requests for a particular detail you need to find which hotel would yield the customer profit. In case of tie between hotels compare the ratings and provide the result.

- priya October 03, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I don't understand the question. Is this a question about getting the best price for the customer, or the max profit for the hotel, or what exactly?

- Anonymous October 03, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

its about getting the best price for the customer

- Anonymous October 04, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

please come to my home and explain to me......

- shakela..... February 14, 2013 | Flag
Comment hidden because of low score. Click to expand.
-2
of 2 vote

Consider each hotel as struct of 5 attributresstruct hotel{ int star; int regular_weekdays; int regular_weekends; int rewardee_weekdays; int rewardee_weekends;};Now check each hotel and maintain the lowest cost hotel. In case of tie with the lowest maitained hotel check if the current hotel's star is more thhan the maintained one, if it is then the replace the maintained hotel with current hotel.

- npsaradhi October 04, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More