自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小人物的草稿本

自己的草稿笔记本,随便摘摘记记而已。

  • 博客(1028)
  • 资源 (7)
  • 问答 (1)
  • 收藏
  • 关注

原创 H-Index II 二分查找

H-Index II Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm?Hint:Expected runtime complexity is in O(log n) and the

2015-09-09 14:10:33 651

原创 Integer to English Words 整数转换为英语表示

Integer to English Words Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 231 - 1.For example,123 -> "One Hundred Twenty

2015-09-09 14:07:55 574 3

原创 斯坦福大学公开课 iOS应用开发教程学习笔记(第四课) Views 视图

第一部分Demo简单计算器的实现 通过递归栈改变项目:http://blog.csdn.net/u012605629/article/details/48291629第二部分,Viewsview的内容1、View是屏幕上一个矩形的空间2、View处理两件事:画出矩形控件,并处理其中的事件3、view组织架构:Vie

2015-09-08 16:43:46 588

原创 斯坦福大学iOS应用开发教程学习笔记(第二课) 计算器实现2 改进版

主要内容同:http://blog.csdn.net/u012605629/article/details/48056593,有部分改进,更改了Calculator部分实现 使用一个递归栈实现。整个项目下载:https://github.com/junxianhu/Calculator-v2,觉得有帮助的可以点击Star啊,谢谢啦。贴几个变化的代码:Ca

2015-09-08 15:30:42 778

原创 First Bad Version 第一个坏数 二分查找

First Bad Version You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each versi

2015-09-08 14:10:02 896

原创 H-Index 引用次数 排序

H-Index Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.According to the definition of h-index o

2015-09-08 14:08:24 903

原创 Invert Binary Tree 二叉树的镜像

Invert Binary TreeInvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired by this or

2015-09-06 11:31:17 354

原创 Implement Stack using Queues 两个队列实现一个栈

Implement Stack using Queues Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get

2015-09-06 11:28:16 424

原创 Summary Ranges 连续的数组格式化输出

Summary Ranges Given a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"].Credits:Special thanks to 

2015-09-01 14:19:33 461

原创 Power of Two 判断是否为2的次方

Power of Two Given an integer, write a function to determine if it is a power of two.Credits:Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases.

2015-09-01 11:05:25 410

原创 斯坦福大学iOS应用开发教程学习笔记(第三课) Objective-C

1、为什么用property,理由有两个: 实体变量的安全性和继承能力 提供延迟实例化,比如:UI更新,一次性检测。1.1 property可以没有实体变量,怎么做到的呢? 不要用@synthesize,自己创建getter 和setter.1.2 反过来,也可以有实体变量,没有property。不过建议使用property。2、为什么用.号

2015-08-31 21:38:51 616

原创 Implement Queue using Stacks 两个栈实现队列

Implement Queue using Stacks Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue

2015-08-31 11:37:49 399

原创 Palindrome Linked List 判断链表是否回文 栈实现

Palindrome Linked List Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?/** * Definition for singly-linked list. * st

2015-08-31 11:28:29 448

原创 Lowest Common Ancestor of a Binary Search Tree 递归寻找二叉查找树公共祖先

Lowest Common Ancestor of a Binary Search Tree Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to the definition of LCA on W

2015-08-29 13:03:11 345

原创 Delete Node in a Linked List 单链表删除节点

Delete Node in a Linked List Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and

2015-08-29 12:49:05 335

原创 斯坦福大学iOS应用开发教程学习笔记(第二课) 计算器实现(mvc实战)

整个项目下载:https://github.com/junxianhu/Calculator,觉得有帮助的可以点击Star啊,谢谢啦。界面不太好看!==!主要的文件目录如下:贴几个关键的文件,其实注视都很详细,可以下载下来仔细看:ViewController.h#import @interface ViewController

2015-08-28 20:07:44 1102

原创 Valid Anagram 比较两个字符串是否相同

Valid Anagram Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.

2015-08-28 15:39:19 445

原创 最长递增子序列 O nlgn时间复杂度

[编程题]最长递增子序列对于一个数字序列,请设计一个复杂度为O(nlogn)的算法,返回该序列的最长上升子序列的长度,这里的子序列定义为这样一个序列U1,U2...,其中Ui 给定一个数字序列A及序列的长度n,请返回最长上升子序列的长度。测试样例:[2,1,4,3,1,5,6],7返回:4class AscentSequence {public:

2015-08-28 15:17:24 2109

原创 Add Digits

Add Digits Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 =

2015-08-27 14:26:17 300

原创 Binary Tree Paths 二叉树遍历

Binary Tree Paths Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->2->5"

2015-08-27 14:24:39 400

原创 斯坦福大学iOS应用开发教程学习笔记(第一课) MVC/Objective-C

最近准备学习学习iOS,心情好看看书,不好看看视频吧。这是第一课,本文也参考了http://blog.csdn.net/totogo2010/article/details/8205810 系列博客。1、iOS的概述-什么是iOS2、MVC - 面向对象的概念3、Objective-C-介绍下语言的概念1、iOS的概述1、内核内核是mach 4.x

2015-08-26 17:53:59 821

原创 Missing Number 第一个缺失的数

Missing Number Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] return 2.Note:

2015-08-26 15:44:51 490

原创 Single Number III 两个不同的数出现一次,其余两次,异或

Single Number III Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only onc

2015-08-26 15:44:04 446

原创 Ugly Number II 寻找第N个丑数

Ugly Number II Write a program to find the n-th ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 is t

2015-08-25 14:25:05 484

原创 Ugly Number 寻找丑数 简单题

Ugly Number Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while

2015-08-25 14:23:36 487

原创 初识 GitHub

主要参考官方的bootcamp https://help.github.com/articles/set-up-git/Set Up Git在GitHub的心脏是一个开源的版本控制系统(VCS)称为Git的。 Git是负责一切GitHub上有关这发生在本地计算机上。如果你不喜欢使用命令行,现在,GitHub上,您可以完成许多Git的相关操作,而无需使用命令行,其中包

2015-08-18 21:43:58 1648 3

原创 Edit Distance 计算两个字符串的变化距离 动态规划

Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the following 3 operati

2015-08-17 15:05:09 809

原创 华为机试题目 若干

闲着无聊,刷了几题华为机试题,适应下。最小长方形描述: 给定一系列2维平面点的坐标(x, y),其中x和y均为整数,要求用一个最小的长方形框将所有点框在内。长方形框的边分别平行于x和y坐标轴,点落在边上也算是被框在内。运行时间限制: 10 Sec内存限制: 128 MByte输入: 测试输入包含若干测试用例,每个测试用例由一系列坐标组成,每对坐标(x y) 占一行,其中

2015-08-13 21:29:00 1228 2

原创 华为2016机试题

2016年华为机试三题都比较简单,很容易AC;第一题:不说了第二题:m取值区间小,计算完后可以直接打表第三题:字符串处理

2015-08-13 21:12:22 759

转载 《深度探索C++对象模型》读书笔记

Inside The C++ Object ModelStanley B. Lippman 转:http://blog.csdn.net/dwater《深度探索C++对象模型》读书笔记                                                                           前 言 Stanley B.Lippman

2015-07-31 21:00:14 955

原创 Plus One 数组加1,vector处理

Plus One Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.H

2015-07-17 18:52:30 611

原创 Insert Interval 插入区间到多个区间

Insert Interval Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to

2015-07-16 16:17:38 651

原创 动手写第一个windows程序 新建一个窗口

主要熟悉windows窗口的一些窗口类,显示等,比较简单,注释比较详细了;#include#include// 函数声明LRESULT CALLBACK WinCipher( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);//主函数int WINAPI WinMain( HINSTANCE hInstance,

2015-07-14 21:25:37 980

原创 Merge Intervals 多区间合并

Merge Intervals Given a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].Hide Tags Array Sort

2015-07-14 14:36:49 492

原创 N-Queens II 回溯法求八皇后

N-Queens II Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.Hide Tags BacktrackingHide Similar Prob

2015-07-13 19:09:20 474

原创 N-Queens N皇后放置问题 回溯法

N-Queens The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solutions to the n-

2015-07-09 19:30:17 825

原创 Permutations II 字符全排列 去除重复的

Permutations II Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2] have the following unique permutations:[1,1,2],

2015-07-08 14:05:20 502

原创 Jump Game II 到达终点的最小步数 模拟

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 pos

2015-07-07 21:26:19 652

原创 Wildcard Matching 字符串含?,*匹配

Wildcard Matching Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).

2015-07-06 19:57:25 567

原创 阿里巴巴2015校招研发在线笔试题

1 不算main这个进程自身,到底创建了多少个进程啊?int main(int argc, char* argv[]){ fork(); fork() && fork() || fork(); fork();}181920211.fork调用一次,返回两次,子进程一次返回0,父进程一次返回pid_t  2. A && B || C 中逻辑与和逻

2015-07-02 21:45:13 1276

JAVA WEB整合开发王者归来源代码

JAVA WEB整合开发王者归来源代码 各个章节详细的代码

2015-11-17

1.MVC.and.Introduction.to.Objective-C]

斯坦福大学iOS应用开发教程学习笔记(第一课) MVC/Objective-C。ppT课件

2015-08-26

一步一步学习ios编程

一步一步学习ios编程 文档清晰 书籍非常简单 明了 适合ios初学者

2015-06-09

趋势科技2013暑期夏令营笔试题

趋势科技2013暑期夏令营笔试题,笔试题目

2015-04-10

Tinyos中文手册

Tinyos中文手册

2014-12-23

背包问题九讲 2.0 RC1

背包问题九讲 崔添翼 (Tianyi Cui) * 2011-09-28 †

2014-12-08

pthreads-w32-2-9-1-release.zip

pthreads-w32-2-9-1-release.zip

2014-11-18

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除