- 博客(26)
- 资源 (7)
- 问答 (1)
- 收藏
- 关注
原创 First Missing Positive 寻找第一个缺失的整数,线性时间常量空间
First Missing Positive Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2.Your algorithm should run i
2015-06-30 11:14:48 518
转载 iOS开发入门实例
著作权声明:本文由http://blog.csdn.net/totogo2010/原创,欢迎转载分享。请尊重作者劳动,转载时保留该声明和作者博客链接,谢谢!iOS学习之动态添加Button和监听UIAlertView按钮1、在xib文件上拖拽添加一个button,标题为:添加button。2、按住ctrl键拖拽到addbuttonViewController.m文件空白
2015-06-29 21:40:24 1382
原创 Sudoku Solver 数独填充 递归判断回溯
Sudoku Solver Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be only one unique solutio
2015-06-29 14:05:17 625
原创 Search in Rotated Sorted Array 二分查找循环移位的有序数组
Search in Rotated Sorted Array Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value t
2015-06-28 18:10:48 738
原创 Longest Valid Parentheses 最长的连续匹配数
Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid
2015-06-26 14:39:30 526
原创 Substring with Concatenation of All Words 字符串操作 匹配的字串数
Substring with Concatenation of All Words You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a c
2015-06-25 14:13:54 405
原创 Reverse Nodes in k-Group 指针操作 每k个翻转链表
Reverse Nodes in k-Group Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes
2015-06-24 21:23:18 517
转载 深入浅出Objective-c
著作权声明:本文由http://blog.csdn.net/totogo2010/原创,欢迎转载分享。请尊重作者劳动,转载时保留该声明和作者博客链接,谢谢!1、十分钟让你明白Objective-C的语法(和Java、C++的对比)C++:void helloWorld(bool ishelloworld) {//干点啥}
2015-06-17 22:30:58 1141
原创 Merge k Sorted Lists 合并多个链表 归并 vector/copy
Merge k Sorted Lists Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity./** * Definition for singly-linked list. * struct ListNode { *
2015-06-17 14:41:03 525
原创 Regular Expression Matching 正则表达式匹配和递归
Regular Expression Matching Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The mat
2015-06-16 18:17:29 775
原创 Median of Two Sorted Arrays 有序数组A和B合并之后第k小的数
Median of Two Sorted Arrays There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(
2015-06-15 14:25:58 500
原创 Count Complete Tree Nodes 统计完全二叉树的节点数
Count Complete Tree Nodes Given a complete binary tree, count the number of nodes.Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, except possib
2015-06-12 20:11:57 627
原创 Maximal Square 最大的正方形
Maximal Square Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matrix:1 0 1 0 01 0 1 1
2015-06-12 20:11:05 579
原创 一步一步学习iOS 摘记
本文参考《一步一步学习iOS6编程》书籍,下载链接:http://download.csdn.net/detail/u012605629/8788505第一部分:Hello World!创建你的第一个 iPhone App创建一个helloworld,app主要是新建按钮弹出alertview;1@interfaceViewController : UI
2015-06-09 15:20:26 2140
原创 Contains Duplicate III 重复数 堆实现
Contains Duplicate III Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] is at most t an
2015-06-09 14:12:37 431
原创 Contains Duplicate II 重复数HASH
Contains Duplicate II Given an array of integers and an integer k, find out whether there there are two distinct indices i and j in the array such that nums[i] = nums[j] and the differen
2015-06-09 14:11:41 442
原创 Kth Largest Element in an Array 数组中的第K大的数
Kth Largest Element in an Array Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,
2015-06-09 14:09:21 548
原创 Combination Sum III 全排列问题
Combination Sum III Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of
2015-06-09 14:09:01 377
原创 Course Schedule II 拓扑排序
Course Schedule II There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take cours
2015-06-09 14:07:11 448
原创 Minimum Size Subarray Sum 滑动窗口移位
Minimum Size Subarray Sum Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return 0 instead.
2015-06-09 14:07:05 414
原创 Implement Trie (Prefix Tree) 字典树的实现
Implement Trie (Prefix Tree) Implement a trie with insert, search, and startsWith methods.Note:You may assume that all inputs are consist of lowercase letters a-z.class TrieNode {pu
2015-06-09 14:03:54 444
原创 Course Schedule 拓扑排序
Course Schedule There are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take course 0 you have to first take course 1
2015-06-01 17:47:41 368
原创 Number of Islands BFS
Number of Islands Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontal
2015-06-01 17:46:03 660
原创 Bitwise AND of Numbers Range
Bitwise AND of Numbers Range Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4.class Solution {public://101 110 111 -> 100 =4//当m!=n,那么最末位必定等0,因为[m
2015-06-01 17:45:26 426
原创 Binary Tree Right Side View 从左边视角输出二叉树的值
Binary Tree Right Side View Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example:Give
2015-06-01 17:43:50 1540
原创 Repeated DNA Sequences 位操作
Repeated DNA Sequences All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated
2015-06-01 17:42:54 452
spring mybatis sql语句使用注解描述
2016-10-08
TA创建的收藏夹 TA关注的收藏夹
TA关注的人