码迷,mamicode.com
首页 >  
搜索关键字:search    ( 12380个结果
[LeetCode] Rotated Sorted Array
1 public class Solution { 2 public int search(int[] A, int target) { 3 int low=0, high=A.length-1; 4 5 while (lowA[mid] ...
分类:其他好文   时间:2014-09-09 21:30:09    阅读次数:178
iOS 修改SearchBar的Textfiled的Cursor游标颜色和字体样式和大小;Disable输入框
因为Search Bar的游标颜色和Tint颜色是统一的,如果要想将游标的颜色设置为其他颜色,则需要到textfiled内部去修改,对于字体也是同样。 实现代码: - (void)setSearchBarTextfiled:(UISearchBar *)searchBar{ for (UIView *view in searchBar.subviews){ for (i...
分类:移动开发   时间:2014-09-09 18:20:09    阅读次数:354
【leetcode】Convert Sorted List to Binary Search Tree-递
我觉着写得比看到的答案更清晰~ class Solution { public: TreeNode *ltob(ListNode *head, ListNode *end) { if(head == end) { TreeNode * node = new TreeNode(head->val); return node;...
分类:其他好文   时间:2014-09-09 12:56:58    阅读次数:166
LeetCode——Unique Binary Search Trees II
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all 5 unique BST's shown below. 1 3...
分类:其他好文   时间:2014-09-09 12:31:39    阅读次数:143
PHP数组函数相关
php的数组函数是一个重点,因为在PHP中是一个主要的复合数据类型,首先是,寻找一个值是否存在一个数组中的函数:array_search — 在数组中搜索给定的值,如果成功则返回相应的键名 mixed array_search ( mixed $needle , array $haystack [,...
分类:Web程序   时间:2014-09-09 12:17:58    阅读次数:176
Android App监听软键盘按键的三种方式(转)
最近有类似需求,在csdn上刚好发现,粘贴过来,以防止忘记喽前言:我们在android手机上面有时候会遇到监听手机软键盘按键的时候,例如:我们在浏览器输入url完毕后可以点击软键盘右下角的“GO”按键加载url页面;在点击搜索框的时候,点击右下角的search符号键可以进行搜索;或者在全部数据输入完...
分类:移动开发   时间:2014-09-08 09:35:46    阅读次数:458
Leetcode: Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.难度70,与Convert Sorted Array to Binary Sear...
分类:其他好文   时间:2014-09-08 06:26:16    阅读次数:263
[LeetCode] Search a 2D Matrix
public class Solution { public boolean searchMatrix(int[][] matrix, int target) { int low=0, high=matrix.length-1; while (low target)...
分类:其他好文   时间:2014-09-08 00:58:06    阅读次数:347
深度优先搜索算法(DFS)以及leetCode的subsets II
深度优先搜索算法(depth first search),是一个典型的图论算法。所遵循的搜索策略是尽可能“深”地去搜索一个图。算法思想是: 对于新发现的顶点v,如果它有以点v为起点的未探测的边,则沿此边继续探测下去。当顶点v的所有边都已被探寻结束,则回溯到到达点v的先辈节点。以相同方法一直回溯到源....
分类:其他好文   时间:2014-09-07 15:55:45    阅读次数:208
set up custom search api
sign up google developer console, create project, generate API keyhttp://stackoverflow.com/questions/4082966/google-web-search-api-deprecated-what-now...
分类:Windows程序   时间:2014-09-07 12:19:35    阅读次数:276
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!