摘要:
二分查找是不是玄学编程 寻找一个数字 最简单的场景,寻找一个数字返回索引 int binarySearch(int[] nums, int target) { int left = 0; int right = nums.length - 1; // 注意 while(left <= right) 阅读全文
摘要:
springboot报错: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception i 阅读全文
摘要:
题目链接:https://leetcode cn.com/problems/construct binary tree from preorder and inorder traversal/ 根据前序遍历和中序遍历构造二叉树 思路: 1. 根据前序遍历确定根结点,哈希根节点的值,得到中序遍历下标。 阅读全文