Search Java Interview Questions  2098 questions in repository. There are more than 200 unanswered questions. Click here and help us by providing the answer. 

 
Interview Questions and Answers for 'Sorting'  9 question(s) found  Order By Newest  
_{}
 
Ans. List  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve collections java sortingCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  
Try 2 Question(s) Test  
 
Ans. Tree Set will sort the Values in the order in which Enum constants are declared.  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve java collections set treeset enum sorting technical leadCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  
_{}
 
Ans. The sorting algorithm is a modified mergesort. This algorithm offers guaranteed n log(n) performance.  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve java algorithm collections collections.sort sorting algorithm expertCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  
Try 1 Question(s) Test  
 
Ans. http://javasearch.buggybread.com/CodeSnippets/searchCodeSamples.php?&category=code&searchOption&keyword=952  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve set collections sorting treeset code codingCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  
_{}
 
^{This question was recently asked at 'Deloitte'.This question is still unanswered. Can you please provide an answer.}  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve sorting heap sort Deloitte frequentCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  
_{}
 
^{This question was recently asked at 'Colgate Palmolive,LDS Church,TPG Axon Capital Management'.This question is still unanswered. Can you please provide an answer.}  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve Algorithm Sorting Algorithm Colgate Palmolive LDS Church TPG Axon Capital Management basic frequentCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  
_{}
 
^{This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer.}  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve sorting bubble sort AmazonCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  
 
Ans. public class SelectionSort { public static void main(String[] args){ int a[] = {1,3,4,5,7,8,2,6}; for(int i=0;i<a.length;i++){ for(int j=0;j<i;j++){ if(a[j] > a[j]){ int temporary = a[j]; a[j] = a[i]; a[i] = temporary; } } } for(int i=0;i<a.length;i++){ System.out.println(a[i]); } } }  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve sorting algorithm selection sortCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  
 
Ans. public class BubbleSort { public static void main(String[] args){ int a[] = {1,3,4,5,7,8,2,6}; for(int i=0;i<a.length1;i++){ for(int j=i;j<a.length;j++){ if(a[j] < a[j]){ int temporary = a[j]; a[j] = a[i]; a[i] = temporary; } } } for(int i=0;i<a.length;i++){ System.out.println(a[i]); } } }  
Help us improve. Please let us know the company, where you were asked this question :  
_{ Like Discuss Correct / Improve sorting algorithm Bubble sortCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion}  