answersLogoWhite

0

By "Java built in sort method", I assume you are referring to Arrays.sort() in the java.util package. Arrays.sort() is overloaded to handle all primitive and Object types except boolean.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the best sorting technique for already sorted array?

If it is already sorted, the best is to leave the array as it is.If it is already sorted, the best is to leave the array as it is.If it is already sorted, the best is to leave the array as it is.If it is already sorted, the best is to leave the array as it is.


What is the different sorting algorithms for arrays in java?

The built in array sorting algorithm (java.util.Arrays.sort) depends on the type of data being sorted. Primitive types are sorted with a modified implementation of quicksort. Objects are sorted with a modified implementation of mergesort.


What is the median of two sorted arrays when combined into a single sorted array?

The median of two sorted arrays when combined into a single sorted array is the middle value when all the numbers are arranged in ascending order.


What is the best search algorithm to use for a sorted array?

The best search algorithm to use for a sorted array is the binary search algorithm.


Is an array that is in sorted order a min heap?

Yes, an array that is in sorted order is considered a min-heap because the smallest item in the array is the root. Also, the rest of the items in the array will gradually get bigger from the root until the end of the array.


Can you store non primitive data type in the array list?

Yes you can store non primitive data type variables in an array. String is a non primitive data type. You can declare a string array as: String a[]=new String[10];


Sort array in ascending descending order in python?

Using sorted(array,reverse=True)


What is a example of a array?

An ordered array is simply an array where all elements are in sorted order: int a[] = {3, 6, 9, 10, 15, 21}; // ordered array An array can either be initialised with ordered elements or the elements may be sorted after initialisation. When inserting new elements into an ordered array, the order must be maintained.


Why arrays are not primitive data type?

An array is a primitive data type. It is the element type that may or may not be primitive.


What is the Java implementation for finding the median of two sorted arrays efficiently?

One efficient Java implementation for finding the median of two sorted arrays is to merge the arrays into one sorted array and then calculate the median based on the length of the combined array.


Non primitive data type?

Struct or array.


What is the best sorting algorithm to use for an almost sorted array?

The best sorting algorithm to use for an almost sorted array is Insertion Sort. It is efficient for nearly sorted arrays because it only requires a small number of comparisons and swaps to sort the elements.