Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


If I have 1000 objects and my requirement is to sort them
quickly, then which collection would you recommend and why?

Answers were Sorted based on User's Feedback



If I have 1000 objects and my requirement is to sort them quickly, then which collection would you ..

Answer / ashutosh dhar

sorted set, already sorted.

Is This Answer Correct ?    3 Yes 0 No

If I have 1000 objects and my requirement is to sort them quickly, then which collection would you ..

Answer / sanjay

The question is about collection and not about the algorithm - My answer is array or arrayList. arraylist is backed by an array so it will have identical performance to an array.

Is This Answer Correct ?    1 Yes 1 No

If I have 1000 objects and my requirement is to sort them quickly, then which collection would you ..

Answer / shankar

quick.it has the least time complexity and with the help
of pivot elements it gets sorted vvery easily.the time
complexity is log2n

Is This Answer Correct ?    2 Yes 3 No

If I have 1000 objects and my requirement is to sort them quickly, then which collection would you ..

Answer / sanjay

ArrayList. indexing is easy, count of objects is already known.

Is This Answer Correct ?    0 Yes 3 No

If I have 1000 objects and my requirement is to sort them quickly, then which collection would you ..

Answer / muni sankar

Heapsort is one of the best general-purpose sorting
algorithms, a comparison sort and part of the selection sort
family. Although somewhat slower in practice on most
machines than a good implementation of quicksort, it has the
advantages of worst-case O(n log n) runtime and being an
in-place algorithm

Is This Answer Correct ?    0 Yes 8 No

Post New Answer

More Core Java Interview Questions

Explain java coding standards for variables ?

0 Answers  


What are the benefits of operations in java?

0 Answers  


Explain a situation where finally block will not be executed?

0 Answers  


Define canvas?

0 Answers  


Can we have any code between try and catch blocks?

0 Answers  


what is meant by Byte code concept in Java?

0 Answers   Aspire,


What is the size of int in 64-bit jvm?

0 Answers  


What method is used to compare two strings ?

4 Answers  


Explain importance of inheritance in java?

0 Answers  


What is one third plus one third as a fraction?

0 Answers  


Can an abstract class have a constructor?

1 Answers   RBS, Wipro,


what is the use of thread?Justify it by project point of view

7 Answers  


Categories