摘要: static int flag=0; public boolean isBalanced(TreeNode root) { flag=0; travel12(root); if(flag==1){ return false; } else { return true; } } public int 阅读全文
posted @ 2022-08-24 16:36 无极是一种信仰 阅读(19) 评论(0) 推荐(0)
摘要: public static void mergeSort(int[] arr1,int left,int right){ if(left>=right){ return; } int middle=(left+right)/2; mergeSort(arr1,left,middle); mergeS 阅读全文
posted @ 2022-08-24 11:10 无极是一种信仰 阅读(24) 评论(0) 推荐(0)
摘要: public static void main(String[] args) { int[] array1=new int[]{2,3,4,1,5,2,6,4,7,8}; fastSort(array1, 0, array1.length-1); for(int k:array1){ System. 阅读全文
posted @ 2022-08-24 10:34 无极是一种信仰 阅读(29) 评论(0) 推荐(0)