"题目" 二分 一不小心耗时超过100%的c++解决方案。哈哈哈 class Solution { public: int findMin(vector& nums) { int l=0; int r=nums.size() 1; while(l=nums[l]&&nums[mid]=nums[l] ...
分类:
其他好文 时间:
2019-05-16 13:56:51
阅读次数:
106
31、chooseoneYouwanttocreateatestdatabaseasareplicaofyourproductiondatabasewithminimuminterventionfromaDBA.Whichmethodwouldyouuse?A)UseDBCAtocreateatemplatefromtheexistingdatabasetocontainthedatabasest
分类:
其他好文 时间:
2019-05-16 10:51:03
阅读次数:
143
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. ...
分类:
其他好文 时间:
2019-05-14 18:53:09
阅读次数:
127
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov ...
分类:
其他好文 时间:
2019-05-13 09:15:43
阅读次数:
101
671. 二叉树中第二小的节点 671. Second Minimum Node In a Binary Tree 题目描述 给定一个非空特殊的二叉树,每个节点都是正数,并且每个节点的子节点数量只能为 2 或 0。如果一个节点有两个子节点的话,那么这个节点的值不大于它的子节点的值。 给出这样的一个二 ...
分类:
其他好文 时间:
2019-05-12 13:44:35
阅读次数:
118
meta篇 1.视窗宽度 其中 width=device-width 是设置视窗宽度为设备视窗宽度,还可以固定宽度,例如: width=640 则是640px的宽度(常见于微信); initial-scale=1.0 :设置缩放比例为1.0; minimum-scale=1.0 和 maximum- ...
分类:
移动开发 时间:
2019-05-08 09:35:57
阅读次数:
158
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim ...
分类:
编程语言 时间:
2019-05-06 14:38:14
阅读次数:
172
方法一:回溯法(用递归) 最基本可以将triangle数组看做一个邻接矩阵的变形,采用深度优先搜索的方法自顶向下遍历,如果triangle数组长度为n那么时间复杂度为O(2^n)(或者如果元素个数为N,那么复杂度N(log(N)) 方法二:动态规划 自底向上递推:可以使用一维数组来完成,从而O(n) ...
分类:
其他好文 时间:
2019-05-06 10:34:35
阅读次数:
178
783. 二叉搜索树结点最小距离 LeetCode783. Minimum Distance Between BST Nodes 题目描述 给定一个二叉搜索树的根结点 root , 返回树中任意两节点的差的最小值。 示例: 输入: root = [4,2,6,1,3,null,null] 输出: 1 ...
分类:
其他好文 时间:
2019-05-06 01:40:28
阅读次数:
158