自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Binary Tree Preorder Traversal & Binary Tree Postorder Traversal

Preorder /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ cl

2013-11-21 10:13:34 598

原创 Merge k Sorted Lists

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *me

2013-11-21 10:04:52 540

原创 Sort

Wiki link http://en.wikipedia.org/wiki/Sorting_algorithm 1. Bubble Sort : O(n^2) for array 两层for循环,交换相邻元素。 2. Selection Sort : O(n^2) for array 两层for循环,每次找到最小值放在对应的位置,交换。 3. Insertion S

2013-11-20 15:43:41 658

原创 Divide Two Integers

A failure is the case (-2147483648, -2147483648). Here the problem is about the boundary of integer. For int (32 bits): [-2147483648, 2147483647] unsigned int [0, 4294967295] long (32bits) same

2013-11-20 10:16:40 573

原创 Remove Nth Node From End of List

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *re

2013-11-14 16:30:59 343

原创 Insertion Sort List

Insertion sort /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public:

2013-11-14 14:28:30 426

原创 Flatten Binary Tree to Linked List

/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Soluti

2013-11-13 02:17:38 310

原创 Linked List Cycle

I: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: bool h

2013-11-12 06:03:30 425

原创 Reorder List

O(n) complexity and O(1) space A linked list reverse function included. /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x)

2013-11-12 03:09:39 406

原创 MATLAB 数据处理

1,均值:mean(A) 2,标准差:std(data(:),flag)  flag=0, 无偏标准差 3,排序:[a, b] = sort(data) 4,求出现频率: x=data(:) x=sort(x); d=diff([x;max(x)+1]); count = diff(find([1;d])) ; y =[x(find(d)) count] 最后输出的y(1)

2013-11-05 15:50:00 831

原创 waitpid

等待所有子进程结束: pid_t   pr;          do {         pr = waitpid(0, NULL, WNOHANG);         printf("pid %d\n",pr);         if (pr==0) {             printf("I'm the father process, the child p

2013-11-01 15:01:28 395

Cracking the Coding Interview

important book for coding interview, concluding interview suggestions, questions and solutions

2013-01-17

8086汇编语言指令表

8086汇编语言指令表 包括伪指令 中断向量号等

2011-03-15

汇编语言的学生信息管理系统

汇编语言的学生管理系统,可输入并显示学生姓名 班级 学号 成绩,对成绩进行排序,求平均值

2011-03-15

空空如也

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

TA关注的人

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