码迷,mamicode.com
首页 >  
搜索关键字:left    ( 12115个结果
ie6,7,8不兼容rgba,写background时候不要写成rgba
一般给一个元素设置背景:.lcProIcon { background: url("images/lcProIcon.png") no-repeat; display: inline-block; height: 56px; left: 0; position: abs...
分类:其他好文   时间:2014-05-15 21:19:44    阅读次数:333
一些编写css的技巧
1.在做项目当中,由静态页面来载入到项目中,作为动态数据的部分,若是这个动态数据,前面或者后面有需要图片显示,一般不用float:left或者right,而是padding。例如:预览
分类:Web程序   时间:2014-05-15 14:05:41    阅读次数:294
Leetcode 暴力 Generate Parentheses
题意:给定数字n,生成所有可能的n对括号的组合 思路:dfs暴力枚举 当左括号出现的次数 < n 的时候,可以选择放置新的左括号 当右括号出现的次数 < 左括号的次数的时候,可以选择放置新的右括号 递归函数: void generateparenthesis(int n, int left, int right, vector& result) 表示将生成的所有可能的n对括号的组合放到result中, 其中, s表示已生成的部分括号, left表示当前的左括号数, right表示当前的右括号...
分类:其他好文   时间:2014-05-15 13:21:12    阅读次数:311
Leetcode--Validate Binary Search Tree
Problem Description: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys l...
分类:其他好文   时间:2014-05-15 11:22:21    阅读次数:317
二分查找需要注意的Bug
#include #include using namespace  std; //下面一个移位是一样的,>>相当于除去2,主要是要用right-left,否则对于大数据来说会产生溢出问题。切记 int binarySearch(int arr[],int len,int number) {     int left=0;     int right=len-1;     in...
分类:其他好文   时间:2014-05-15 07:14:38    阅读次数:272
leetcode -day14 Populating Next Right Pointers in Each Node I II
1、 ?? Populating Next Right Pointers in Each Node Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; } Populate...
分类:其他好文   时间:2014-05-15 04:57:36    阅读次数:221
【LeetCode】Search a 2D Matrix
题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right.The first integer...
分类:其他好文   时间:2014-05-15 03:41:11    阅读次数:257
UVALive 6609(Minimal Subarray Length)维护递增序列|RMQ
题意:给一个整数序列(可能有负数),求最短的连续序列使得序列之和大于等于整数x; 解法:第一种是On的复杂度:                   我们要的是sum[j]-sum[i]>=x,如果有两个决策j = sum[j'],那么j就是没用的。即维护一个sum[j]递增序列。然后每次可以二分查找,但是这里有个特点就是要得到最近的,可以同时维护一个left指针,left指针用于跟进更...
分类:其他好文   时间:2014-05-15 03:20:26    阅读次数:303
分治法--二分查找、乘方、斐波那契数
1、二分查找常见错误:死循环:循环体外的初始化条件,与循环体内的迭代步骤, 都必须遵守一致的区间规则,也就是说,如果循环体初始化时,是以左闭右开区间为边界的,那么循环体内部的迭代也应该如此.如果两者不一致,会造成程序的错误.溢出:middle=left+(right-left)/2终止条件:一般来说...
分类:其他好文   时间:2014-05-14 23:26:03    阅读次数:402
Pat(Advanced Level)Practice--1043(Is It a Binary Search Tree)
Pat1043代码题目描述:A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contain...
分类:其他好文   时间:2014-05-14 22:03:25    阅读次数:487
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!