Question: How would I create a java class using Vectors that takes in a Vector v and integer n that: returns the largest n numbers of
How would I create a java class using Vectors that takes in a Vector v and integer n that:
returns the largest n numbers of the Vector v.
For example: Vector v = {1, 6, 3, 5}
int n = 2
The result would be 6, 5.
Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
