Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


mohit
programming problem
0 Answer(s)      3 years and 7 months ago
Posted in : Java Interview Questions


  1. Kingdom of Maplewood is a beautiful country comprising of a lot of small islands of different areas. All the islands are in a straight row. King Rosewood is getting old and has decided to divide the islands among his two sons - Eric and Finn. Luckily, the total number of islands is even. He has also decided a few rules for the division of islands: i) Eric and Finn will be given alternate turns to choose the islands. ii) They can only choose one island at a time from either the beginning or the end of the row of islands. iii) Once an island is chosen by someone, it cannot be chosen by other person.

Suppose you are Eric and you are given the first choice. Find out the maximum area you are sure you can pick.

  1. You own an IPL franchisee. There are N players eligible to play in the coming season. Each player has a fixed cost ranging from 0 to C based on his previous performance. As your team won the last yearâ??s IPL, you are first one allowed to pick a team. You can pick as many players as you like, but you have limited resources. Your advisers tell you that, if you keep the difference between the sum of the costs of players you buy and the ones you donâ??t to minimum, you stand to make the best use of your resources. Although you have doubts about their advice you decide to go ahead with it. Write a program in the language of your choice to complete the task.

Advertisement
View Answers

Related Tutorials/Questions & Answers:
programming problem
programming problem   Kingdom of Maplewood is a beautiful country comprising of a lot of small islands of different areas. All the islands are in a straight row. King Rosewood is getting old and has decided to divide the islands
java programming problem - JDBC
java programming problem  Hi, Request you to provide the source code in Java for the following programming problem : upload .csv file data into oracle database. please send the solution to raichallp@yahoo.in
Advertisements
problem in programming - JSP-Servlet
problem in programming  Hi! I am new with jsp. I am facing a problem in programming to calculate the time interval between login time and logout time of user
java programming problem - JDBC
java programming problem  Hi, Request you to provide a solution ( analysis & design & unit test plan & code & test criteria ) to the following problem to the following mail id : Problem : upload excel file data into oracle
Programming problem - Java Beginners
Programming problem  Good afternoon Ma'am/Sir, Can you help me... it difficult to learn java programming? Based on my survey it seems that java programming is the hardest part of their studies.. I also want to know
programming problem - Java Beginners
programming problem  i am using FileDialog to select an image and displaying it on a canvas using getDirectory() and getFile(). now i want to use the path obtained from getDirectory() and getFile()to obtain same selected image
java programming problem - Java Beginners
java programming problem   Given a deck of ncards unique cards.Cut the deck iCut cards from the top portion of the deck followed by the bottom card... etc. Alternating the remaining cards go on top. The problem is to find
java programming problem - Java Beginners
java programming problem   num=(a/b)*(c/d) In the problem, 'num' is given . "0<2" we have to find out the values of a,b,c,d upto five places of decimal. there can be many combinations of a,b,c,d . the solution space
Java programming problem - Java Beginners
Java programming problem  could anyone help me to solve this problem... Implement a superclass Person. Make two classes, Student and Instructor that inherit from Person. A Person has name, year of birth and day. Student has
problem in jsp programming - JSP-Servlet
problem in jsp programming  Write a JSP program which displays a webpage containing arrival of new items within a particular month in the different... in solving the problem : Connection with mysql database
java programming problem - Java Beginners
java programming problem  Hello..could you please tell me how can I count the occurrence of EACH alphabet in a string..? Thanks  Hi Ruby I am sending some link where you can find solution of your prblem
java programming problem - Java Beginners
java programming problem  we are given a number ,num. ( 0<2 ) we have to represent the number(num) in the form of a,b,c,d such that: num=(a/b)*(c/d) for eg. let num=2, then a=1.5 b=0.75 c=0.4 d=0.4
Java Programming Problem - Java Beginners
Java Programming Problem  Q. How write a program that asks the user's name, and then greets the user by name. Before outputting the user's name, convert it to upper case letters? For example, if the user's name is Fred
Java Programming and Coding problem - Java Beginners
Java Programming and Coding problem  How write a program that helps the user count his change. The program should ask how many quarters the user has, then how many dimes, then how many nickels, then how many pennies
Programming
Programming  Given a number n, write a programming to determine its square root if it is possible, in the contraly case print an appropriate massege on the screen
programming
Java Constructor programming for single and double constructor  write a program which have no argument constructor ,single parameter constructor constructor,double parameter constor,and the now when we create a object
programming c#
programming c#   create and make use of at least one class with appropriate instance methods to solve the programming problem. use console-based menus to navigate between the functionality offered by the application. at least one
Programming with JSP
Programming with JSP  Who will post me the answer
Java Programming
Java Programming  Hi, What is Java Programming? How I can learn Java Programming in one month? Thanks
Programming with JSP
Programming with JSP  Write a program using jsp that accepts a course code as input and displays the course title the program to which it belongs
Ajax programming
Ajax programming  Hi, How I can start ajax programming easily? I... concept. What should be my starting point for Ajax programming? Thanks   Hi, If you have prior programming experience in any web development
Programming (general)
Programming (general)  I haven't yet started college/university but I'm interested in studying programming. I wondering if programming is difficult or confusing with all the codes you have to learn? Also how many languages would
programming of foxpro
programming of foxpro  hello sir , sir i am use the foxpro . but i know about c . sir how can i learn fox pro . i know about something about foxpro
programming concept
programming concept  Write a program that allows the user to input a total dollar amount for an online shopping order and computes and outputs the shipping cost based on the following schedule
C Programming
C Programming  hi,how can i write a program in C programming to place reservation in air plane from the menu let the user to inter his/her gender(W or M)and draw seats by using ascii codes and choose where he/she will sit
programming error
programming error  I got an error when i did the following program the prg. is to "select the name from database when the age is given for the respective name" error i got is:SQL exception please give me the solution by providing
Socket Programming
Socket Programming  How to connect a computer through IP only and check whether it is up and running? I can't see any method in Socket programming where I can pass only IP address as argument. I need the pass port number also
Advertisements
 

 

 

DMCA.com