码迷,mamicode.com
首页 >  
搜索关键字:binary search    ( 21761个结果
docker安装nexus
1.查找镜像 docker search nexus 2.拉取镜像 docker pull sonatype/nexus3 3.启动容器 docker run -d -p 8081:8081 -p 8082:8082 -p 8083:8083 -v /etc/localtime:/etc/local ...
分类:其他好文   时间:2020-07-19 17:49:26    阅读次数:100
34. 在排序数组中查找元素的第一个和最后一个位置
给定一个按照升序排列的整数数组 nums,和一个目标值 target。找出给定目标值在数组中的开始位置和结束位置。 你的算法时间复杂度必须是 O(log n) 级别。 如果数组中不存在目标值,返回 [-1, -1]。 示例 1: 输入: nums = [5,7,7,8,8,10], target = ...
分类:编程语言   时间:2020-07-19 16:33:02    阅读次数:61
MySQL索引底层实现原理
优秀博文: MySQL索引背后的数据结构及算法原理 B树、B-树、B+树、B*树【转】,mysql索引 MySQL 和 B 树的那些事 索引的本质 MySQL官方对索引的定义为:索引(Index)是帮助MySQL高效获取数据的数据结构。提取句子主干,就可以得到索引的本质:索引是数据结构。 我们知道, ...
分类:数据库   时间:2020-07-19 16:10:12    阅读次数:66
leetcode-----99. 恢复二叉搜索树
链接:https://leetcode-cn.com/problems/recover-binary-search-tree/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode ...
分类:其他好文   时间:2020-07-19 11:36:41    阅读次数:70
leetcode-----100. 相同的树
链接:https://leetcode-cn.com/problems/same-tree/ 代码 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode ...
分类:其他好文   时间:2020-07-19 11:33:58    阅读次数:44
搜索插入位置
此博客链接: https://www.cnblogs.com/ping2yingshi/p/13337999.html 搜索插入位置 题目链接:https://leetcode-cn.com/problems/search-insert-position/submissions/ 给定一个排序数组和 ...
分类:其他好文   时间:2020-07-19 00:56:40    阅读次数:101
[编程题] lc[236. 二叉树的最近公共祖先]
[编程题] lc:236. 二叉树的最近公共祖先 题目描述 输入输出例子 思路 使用后续遍历的思想,根据找到了左和右的情况,进行相应的返回结果。 Java代码 /** * Definition for a binary tree node. * public class TreeNode { * i ...
分类:其他好文   时间:2020-07-19 00:39:06    阅读次数:85
知乎图片下载
抓取一波知乎表情图呀,表情来源于知乎某个提问,地址为 https://www.zhihu.com/question/311745535. import requests import re import os class CrawlImg: def __init__(self): self.ques ...
分类:其他好文   时间:2020-07-19 00:37:54    阅读次数:84
LeetCode 951 翻转等价二叉树
题目链接:https://leetcode-cn.com/problems/flip-equivalent-binary-trees/ 解题思路:进行递归,当root1和root2都为空时,返回true,如果双方一个不为空,另一个为空为或双方根节点值不相等false,否则对左右子树分别不翻转判断或翻 ...
分类:其他好文   时间:2020-07-18 21:54:16    阅读次数:70
从上到下打印二叉树 III
题解:层次遍历的基础上加个计数器,偶数层得到的结果反转一下 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeN ...
分类:其他好文   时间:2020-07-18 21:52:24    阅读次数:59
21761条   上一页 1 ... 50 51 52 53 54 ... 2177 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!