我的.vimrc文件

set nocompatible set autoindent set smartindent set showmatch set ruler set incsearch set mouse=n set tabstop=4 set shiftwidth=4 set softtabstop=4 se...

2014-07-28 19:41:56

阅读数 621

评论数 0

第九章 TCP和UDP同时用复用一个端口实现一个回射服务器

linux服务器编程 TCP和UDP同时用复用一个端口实现一个回射服务器

2014-07-13 17:24:54

阅读数 1709

评论数 0

第九章 select模式下的非阻塞连接

#include #include #include #include #include #include #include #include #include #include #include #include #include #define BUFFER_SIZ...

2014-07-13 17:11:52

阅读数 684

评论数 0

第九章 用多线程来读取epoll模型下的客户端数据

linux服务器编程 用多线程来读取epoll模型下的客户端数据

2014-07-13 16:54:07

阅读数 1118

评论数 0

第九章 select用法初试

#include #include #include #include #include #include #include #include #include #include #include int main( int argc, char* argv[] ) { ...

2014-07-13 16:46:04

阅读数 627

评论数 0

第九章 两种模式的比较

linux服务器编程

2014-07-13 16:41:23

阅读数 891

评论数 1

华为上机 公共字串计算

我用这种方法,提交了好几次, #include #include #include #include using namespace std; int getCommonStrLength(char *pFirstStr,char *pSecondStr) { if(strlen...

2014-07-12 16:01:35

阅读数 845

评论数 6

leetcode 11 Linked List Cycle

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space?

2014-07-10 16:50:26

阅读数 560

评论数 0

leetcode 10 Linked List Cycle II

Given a linked list, return the node where the cycle begins. If there is no cycle, return null. Follow up: Can you solve it without using extra...

2014-07-10 16:39:47

阅读数 570

评论数 0

leetcode 17 Candy

There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the followin...

2014-07-10 15:42:07

阅读数 534

评论数 0

leetcode 15 Single Number II

Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear r...

2014-07-10 15:02:32

阅读数 639

评论数 0

leetcode 66 Plus One

#include #include #include using namespace std; vector plusOne(vector &digits) { int len=digits.size(); vector res(digits); ...

2014-07-09 21:15:28

阅读数 528

评论数 0

leetcode 74 Subsets

Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must be in non-descending order.The solution set...

2014-07-09 15:34:32

阅读数 570

评论数 0

leetcode 75 Combinations

#include #include #include using namespace std; void com(int depth,int n,int k,vector v,vector > &res) { if(v.size()==k) { ...

2014-07-09 15:06:49

阅读数 656

评论数 0

leetcode 46 Permutations

#include #include #include using namespace std; void perm(int start,int end,vector in,vector > &res) { if(start==end) { ...

2014-07-09 11:26:41

阅读数 572

评论数 0

leetcode 149 Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters...

2014-07-07 22:01:15

阅读数 548

评论数 0

leetcode 69 Sqrt(x)

int sqrt(int x) { return std::sqrt(x); }

2014-07-07 19:54:50

阅读数 719

评论数 0

leetcode 127 Word Ladder

Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Only one lett...

2014-07-07 16:20:16

阅读数 878

评论数 0

leetcode 150 Median of Two Sorted Arrays

There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should ...

2014-07-07 11:06:19

阅读数 716

评论数 0

leetcode 151 Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the t...

2014-07-06 21:06:24

阅读数 731

评论数 1

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