Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

>> REGISTER NOW TO START POSTING

Members have full access to the forums. Advertisements are removed for registered users.

# Thread: CAN any one do this !

1. ## CAN any one do this !

Question: We are given an array of 2n integers wherein each pair in this array of integers represents the year of birth and the year of death of a dinosaurs respectively. The range of valid years we want to consider is [-100000 to 2005]. For example, if the input was:

-80000 -79950 20 70 22 60 58 65 1950 2004

it would mean that the first dinosaur had a birth year of –80000 and an year of death of –79950 respectively. Similarly the second dinosaur lived from 20 to 70 and so on and so forth.

We would like to know the largest number of dinosaurs that were ever alive at one time. Write a method to compute this, given the above array of 2n integers.

Write one of the following methods:

C/C++:
int find_max_dinosaur (int[] years);

Java :
public int findMaxdinosaur (int[] yaears);

hope you help me experts

2. ## CAN any one do this !

Question: We are given an array of 2n integers wherein each pair in this array of integers represents the year of birth and the year of death of a dinosaurs respectively. The range of valid years we want to consider is [-100000 to 2005]. For example, if the input was:

-80000 -79950 20 70 22 60 58 65 1950 2004

it would mean that the first dinosaur had a birth year of –80000 and an year of death of –79950 respectively. Similarly the second dinosaur lived from 20 to 70 and so on and so forth.

We would like to know the largest number of dinosaurs that were ever alive at one time. Write a method to compute this, given the above array of 2n integers.

Write one of the following methods:

C/C++:
int find_max_dinosaur (int[] years);

Java :
public int findMaxdinosaur (int[] yaears);

3. ## Re: CAN any one do this !

Do you have any specific questions about your assignment?
Please post your code and any questions about problems you are having.

4. ## plz tell the method

Question: We are given an array of 2n integers wherein each pair in this array of integers represents the year of birth and the year of death of a dinosaurs respectively. The range of valid years we want to consider is [-100000 to 2005]. For example, if the input was:

-80000 -79950 20 70 22 60 58 65 1950 2004

it would mean that the first dinosaur had a birth year of –80000 and an year of death of –79950 respectively. Similarly the second dinosaur lived from 20 to 70 and so on and so forth.

We would like to know the largest number of dinosaurs that were ever alive at one time. Write a method to compute this, given the above array of 2n integers.

Write one of the following methods:

C/C++:
int find_max_dinosaur (int[] years);

Java :
public int findMaxdinosaur (int[] yaears);

5. ## Re: plz tell the method

What have you tried? Where are you stuck?

This isn't a homework service. Please see the link in my signature on asking questions the smart way: especially the bits about using descriptive titles and asking specific questions.

--- Update ---

I've merged your duplicate threads. Please stop spamming multiple copies of the same question, and please stop privately messaging members the same thing. This is your homework, not ours. If you put as much effort into actually doing it as you're putting into *not* doing it, you'd be done by now.

6. ## Re: CAN any one do this !

I vote we lock this thread since it appears to be little more than a homework dump, but agree we give him a little time to reply first to show his efforts and to ask a specific question.

7. ## Re: CAN any one do this !

OK, thread locked. I invite the original poster to ask new questions, but if so, to show their work and to not ask others to do his work for him.

8. ## The Following User Says Thank You to curmudgeon For This Useful Post:

KevinWorkman (February 1st, 2013)