码迷,mamicode.com
首页 >  
搜索关键字:position    ( 9475个结果
Jump Game II
题目 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 maximum jump length at that position. ...
分类:其他好文   时间:2014-06-19 11:46:47    阅读次数:277
Jump Game
题目 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 maximum jump length at that position. ...
分类:其他好文   时间:2014-06-19 10:05:39    阅读次数:278
Search for a Range
题目 Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target i...
分类:其他好文   时间:2014-06-15 16:53:32    阅读次数:177
[LeetCode] Search for a Range [34]
题目 Given a sorted array of integers, find the starting and ending position of a given target value. 解题思路: 查找一个数出现的范围,给一个排好序的数组和一个数,找出这个数在数组中出现的范围。 这个题直接使用一次遍历就可以得到结果,这样的时间复杂度为O(n)。但是对于有序数组我们一般可以使用二分查找可以得到更好的O(logn)的时间复杂度。我们可以使用二分查找找到这个数第一次出现的位置和这个数最后一次出现的位...
分类:其他好文   时间:2014-06-15 16:19:16    阅读次数:237
css之 斜线
.x { border: solid 1px red; width: 100px; height: 100px; position: relative; background-color: ...
分类:Web程序   时间:2014-06-13 13:13:47    阅读次数:262
ListView.setSelection(position)不起作用
选择同事列表页面,在Adapter里设置复选框背景时调用了notifyDataSetChanged(),阻碍了UI线程,因此在设置ListView.setSelection(position)时不起作用。有时调用adapter.notifyDataSetChanged时也没有刷新页面,可以使用Lis...
分类:其他好文   时间:2014-06-13 00:24:39    阅读次数:291
CSS BUG 总结
1.IE7 容器使用了滚动条 其子元素中使用 position:relative ,position变成了fixed,从而不随容器的滚动条滚动; 解决: 在其容器元素的属性中也加入 position:relative (也就是使用滚动条的元素)
分类:Web程序   时间:2014-06-12 08:00:59    阅读次数:218
站点二级导航标题特效
非常多站点已经不满足于一级标题的展示,可能非常多的时候有二级标题,三级标题等等。那么怎样设置二级标题以及怎样把二级标题做的好看呢。以下的代码中注意:1.为了让二级标题有渐隐渐现的感觉,用了transition样式2.二级标题的定位始终是一个困扰我好久的难题。要确保一级标题有position属性(不能...
分类:其他好文   时间:2014-06-10 21:46:08    阅读次数:292
C++数组类模板
* 作为数组类模板,肯定没有vector做得好,但是普通的数组有1个好处就是能直接操作内存,vector在这方面就不是很方便了。网上虽然也有数组类模板,多维的设计基本上都不是很好。我这个类模板多维的设计借鉴了vector,如2维数组vector> vvArr;下附源码*/ #pragma once enum E_POSIITION { begin_position = 0,...
分类:编程语言   时间:2014-06-10 07:07:51    阅读次数:327
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!