自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(66)
  • 资源 (11)
  • 收藏
  • 关注

原创 060 - Permutation Sequence

The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""312""

2015-11-27 08:36:20 318

原创 059 - Spiral Matrix II

Given an integer n, generate a square matrix filled with elements from 1 ton2 in spiral order.For example,Given n = 3,You should return the following matrix:[ [ 1, 2, 3 ], [ 8, 9, 4 ], [

2015-11-27 08:35:28 208

原创 058 - Length of Last Word

Given a string s consists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defi

2015-11-27 08:34:09 249

原创 057 - 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 their start times.Examp

2015-11-27 08:33:13 204

原创 056 - 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].int intercmp(const void *a, const void *b){

2015-11-27 08:31:36 208

原创 055 - 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.Determine if

2015-11-26 18:28:07 207

原创 054 - Spiral Matrix

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example,Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ]]You

2015-11-26 18:27:06 244

原创 053 - Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1] has

2015-11-26 18:26:11 324

原创 052 - N-Queens II

Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.static int Q; static int retcur;int locok(char **queen, int cu

2015-11-26 18:24:51 294

原创 051 - N-Queens

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

2015-11-26 18:23:44 341

原创 050 - Pow(x, n)

Implement pow(x, n).double myPow(double x, int n) { int flag = 0; if (n == 0) return fabs(x) < 0.000001? 0 : 1; if (n == INT_MIN) return fabs(x) >= 1.000000 && fabs(

2015-11-25 17:33:37 392

原创 049 - Group Anagrams

Given an array of strings, group anagrams together.For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return:[ ["ate", "eat","tea"], ["nat","tan"], ["bat"]]Note:For t

2015-11-25 17:32:37 387

原创 048 - Rotate Image

You are given an n x n 2D matrix representing an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this in-place?void rotate(int** matrix, int matrixRowSize, int

2015-11-25 17:31:48 239

原创 047 - 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], [1,2,1], and [2,1,1].

2015-11-25 17:30:52 240

原创 046 - Permutations

Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2,3,1],[3,1,2], and [3,2,1].static int

2015-11-25 17:30:19 266

原创 045 - 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.Your goal is

2015-11-25 17:29:02 229

原创 044 - Wildcard Matching

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

2015-11-25 17:28:18 191

原创 043 - Multiply Strings

Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-negative.static void turnaround(char *str)

2015-11-25 17:26:44 333

原创 042 - Trapping Rain Water

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.For example, Given [0,1,0,2,1,0,1,3,2,1,2,1]

2015-11-25 17:25:10 266

原创 041 - 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 in O(n) time and uses constant spa

2015-11-25 17:24:08 223

原创 修改内核代码-打补丁-checkpatch.pl

我们下载一份内核源码,修改了一些代码,需要制作补丁,用diff命令比如现在有两份内核源码 kernel-old, kernel-new打补丁,命令为diff -ruN kernel-old kernel-new > diff.patch可以通过Kompare,或者直接用gedit打开查看修改的代码接着要查看我们修改的代码是否符合内核编码规范就需要用到

2015-11-25 15:30:57 4764

原创 040 - Combination Sum II

Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inC where the candidate numbers sums to T.Each number in C may only be used once in the combinatio

2015-11-19 17:12:14 271

原创 039 - Combination Sum

Given a set of candidate numbers (C) and a target number (T), find all unique combinations inC where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited numbe

2015-11-19 17:07:41 251

原创 038 - Count and Say

The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off as "one 1" or 11.11 is read off as "two 1s" or 21.21 is read off as "one 2

2015-11-19 17:05:32 203

原创 037 - 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 solution.A sudoku puzzle.

2015-11-19 17:02:38 275

原创 036 - Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are filled with the character'.'.A partially filled s

2015-11-19 17:00:39 270

转载 O06 - proc

通过proc文件系统配置#include #include #include #include #include #include static unsigned int variable;static struct proc_dir_entry *test_dir, *test_entry;#if LINUX_VERSION_CODE < KERNEL_VERSI

2015-11-17 10:11:35 296

原创 指针之char** 与 char[][]的区别

char ** 和 char *[]是等价的char **x / char *x[] , 典型的例子是main函数的第二个参数可以写成char **argv, 也可以写成char *argv[]表示x是一个存储指针的数组,这个数组每个元素都是指针,在32系统上一个指针长度为4字节那么x[0] 和 x[1]之间相差4个字节x数组内存分布如下x[0], x[1], x[2], x[

2015-11-12 11:32:19 471

原创 035 - Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.

2015-11-12 10:30:58 298

原创 034 - 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 is not found in

2015-11-12 10:26:05 221

原创 033 - 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 to search. If found in the array return its

2015-11-11 18:52:03 176

原创 032 - 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 parentheses substring is "()", which

2015-11-11 18:45:47 219

原创 031 - Next Permutation

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest possible o

2015-11-11 18:43:31 290

原创 030 - 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) ins that is a concatenation of each word in words exactly once and w

2015-11-11 18:39:07 212

原创 029 - Divide Two Integers

Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.实现两个整数相除,不能使用乘,除,模运算int divide(int dividend, int divisor) { if (dividend =

2015-11-11 18:38:29 196

原创 028 - Implement strStr()

Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.int strStr(char* haystack, char* needle) { char *p = strstr(ha

2015-11-11 18:36:02 227

原创 027 - Remove Element

Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new length.

2015-11-11 18:33:54 180

原创 026 - Remove Duplicates from Sorted Array

Given a sorted array, remove the duplicates in place such that each element appear onlyonce and return the new length.Do not allocate extra space for another array, you must do this in place with

2015-11-11 18:32:31 210

原创 025 - 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 in the end should remain as it is.

2015-11-11 18:30:23 195

原创 024 - Swap Nodes in Pairs

Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your algorithm should use only constant space. You m

2015-11-11 18:28:53 256

snull.tar.bz2

snull linux3.x版本的代码,还有客户端测试程序,以及爪包结果,流程图分析等

2015-12-18

DM9000_Application_Notes_Ver_1_22.pdf

dm9000网卡驱动开发文档 The DM9000 is a fully integrated and cost-effective Fast Ethernet MAC controller with a general processor interface, an EEPROM interface, a 10/100M PHY and 4K-dword SRAM (3K-byte for TX FIFO and 13K-byte for RX FIFO). It is designed with low power and high performance process that supports 3.3V with 5V tolerant I/O. Besides, the DM9000 supports 8/ 16/ 32-bit processor interface to internal memory accesses for many different processors.

2015-12-08

core java 第八版代码

Core Java by Cay S. Horstmann and Gary Cornell was originally published in the Java series of Sun Microsystems Press and is now published by Prentice-Hall. The book is aimed at experienced programmers who want to learn how to write useful Java applications and applets. No hype, no toy code, no language lawyering, just solid facts and in-depth research to help you write real programs.

2015-02-14

core java 第七版代码

Core Java by Cay S. Horstmann and Gary Cornell was originally published in the Java series of Sun Microsystems Press and is now published by Prentice-Hall. The book is aimed at experienced programmers who want to learn how to write useful Java applications and applets. No hype, no toy code, no language lawyering, just solid facts and in-depth research to help you write real programs.

2015-02-14

[Linux命令详解词典].施威铭研究室.扫描版.part2

精选381个命令 详细列出1729个范例 提供3种查询索引 适合各种linux发行版 共两部分

2011-10-14

[Linux命令详解词典].施威铭研究室.扫描版.part1

精选381个命令 详细列出1729个范例 提供3种查询索引 适合各种linux发行版 共两部分

2011-10-14

Ubuntu 权威指南

从系统的安装,到用户的各种管理,以及系统的运作原理。都有一个完整的描述!

2011-09-30

高级Linux程序设计

linux下c程序编写入门,最基本的编写 编译 调试等

2011-09-30

C程序设计语言(第2版·新版)习题解答

C程序设计语言(第2版·新版)习题解答。供参考

2011-09-28

Ubuntu中文图书大全

很适合ubuntu入门的一本书,里面集中了多本书的精彩章节。

2011-09-28

空空如也

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

TA关注的人

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