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

What is a singleton class in Java?

0 Answers  


Is java is a fully object object oriented language?

31 Answers   TCS,


Given: 1. package test; 2. 3. class Target { 4. public String name = “hello”; 5. } What can directly access and change the value of the variable name? 1 any class 2 only the Target class 3 any class in the test package 4 any class that extends Target

7 Answers   Infosys, WW,


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

0 Answers  


can java object be locked down for exclusive use by a given thread? : Java thread

0 Answers  


Can I declare class as static or private?

0 Answers  


What is port number in java?

0 Answers  


Can we define package statement after import statement in java?

0 Answers  


Why lambda expression is used in java?

0 Answers  


What is difference between Heap and Stack Memory?

0 Answers  


Explain pass by reference and pass by value?

8 Answers   IBM, Wipro,


When does Exception occurs?

3 Answers  


Categories