摘要: 思路错一点点,努力都是白费。 public String reorganizeString(String S) { int N = S.length(); int[] counts = new int[26]; for (char c: S.toCharArray()) counts[c-'a'] 阅读全文
posted @ 2020-06-23 15:35 欣姐姐 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 由中序遍历得到数组 用递归构造平衡二叉树 List<Integer> list = new ArrayList<>(); public TreeNode balanceBST(TreeNode root) { //根据数组进行平衡二叉树的创建 inOrder(root); return buildB 阅读全文
posted @ 2020-06-23 09:51 欣姐姐 阅读(156) 评论(0) 推荐(0) 编辑