public class SortUtils extends Object
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static void |
siftDown(double[] arr,
int k,
int n) |
To restore the max-heap condition when a node's priority is decreased.
|
static void |
siftDown(float[] arr,
int k,
int n) |
To restore the max-heap condition when a node's priority is decreased.
|
static void |
siftDown(int[] arr,
int k,
int n) |
To restore the max-heap condition when a node's priority is decreased.
|
static <T extends Comparable<? super T>> |
siftDown(T[] arr,
int k,
int n) |
To restore the max-heap condition when a node's priority is decreased.
|
static void |
siftUp(double[] arr,
int k) |
To restore the max-heap condition when a node's priority is increased.
|
static void |
siftUp(float[] arr,
int k) |
To restore the max-heap condition when a node's priority is increased.
|
static void |
siftUp(int[] arr,
int k) |
To restore the max-heap condition when a node's priority is increased.
|
static <T extends Comparable<? super T>> |
siftUp(T[] arr,
int k) |
To restore the max-heap condition when a node's priority is increased.
|
static void |
swap(double[] arr,
int i,
int j) |
Swap two positions.
|
static void |
swap(float[] arr,
int i,
int j) |
Swap two positions.
|
static void |
swap(int[] arr,
int i,
int j) |
Swap two positions.
|
static void |
swap(Object[] arr,
int i,
int j) |
Swap two positions.
|
public static void swap(int[] arr,
int i,
int j)
public static void swap(float[] arr,
int i,
int j)
public static void swap(double[] arr,
int i,
int j)
public static void swap(Object[] arr, int i, int j)
public static void siftUp(int[] arr,
int k)
public static void siftUp(float[] arr,
int k)
public static void siftUp(double[] arr,
int k)
public static <T extends Comparable<? super T>> void siftUp(T[] arr, int k)
public static void siftDown(int[] arr,
int k,
int n)
public static void siftDown(float[] arr,
int k,
int n)
public static void siftDown(double[] arr,
int k,
int n)
public static <T extends Comparable<? super T>> void siftDown(T[] arr, int k, int n)
Copyright © 2019. All rights reserved.