摘要:
class Solution { public int[][] reconstructQueue(int[][] people) { int len = people.length; List<int[]> ans = new ArrayList<int[]>(); Arrays.sort(peop 阅读全文
摘要:
1、Arrays.sort(数组名) 对数组中的所有元素进行排序,并且是按照从小到大的顺序进行的。 Integer[] test = new Integer[n]; Arrays.sort(test); 2、Arrays.sort(数组名,起始下标,终止下标) 对数组中的部分元素进行排序,即从起始下 阅读全文
摘要:
之前的技术栈是C/C++,后接触Java的输入输出,怕日后生疏,今天在这里记录一下下。 一、输入 Scanner sc = new Scanner(System.in); Scanner sc = new Scanner(new BufferedInputStream(System.in)); 在输 阅读全文