- 博客(8)
- 收藏
- 关注
转载 socket的listen()的backlog参数和未完成队列、已完成队列的关系
TCP:socket的listen()的backlog参数和未完成队列、已完成队列的关系listen函数是网络编程一个基本的函数,而且它的backlog参数却是和TCP协议息息相关的。我们来看一下一个backlog参数到底有多少秘密。一、 为了理解backlog参数,我们必须首先认识listen函数。#include<sys/socket.h> int listen(int sockfd, in
2015-05-31 19:35:49 2030
原创 Valid Parentheses问题
Valid Parentheses问题Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}”
2015-05-29 19:53:26 352
原创 Letter Combinations of a Phone Number
Letter Combinations of a Phone Number Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone bu
2015-05-18 22:17:18 298
原创 Longest Common Prefix字符串最长公共前缀问题
Longest Common Prefix字符串最长公共前缀问题 Write a function to find the longest common prefix string amongst an array of strings. java代码public static String longestCommonPrefix(String[] strs) { if(strs.le
2015-05-18 22:12:33 479
原创 Reverse Integer反转int数问题
Reverse Integer反转int数问题 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 注意int数溢出问题,当溢出是返回0; java代码public static int reverse(int x) { lo
2015-05-13 20:33:13 490
原创 最长回文子字符串问题
Longest Palindromic Substring最长回文子字符串问题 Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindr
2015-05-12 16:25:27 408
原创 Longest Substring Without Repeating Characters问题--解题笔记
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 for
2015-05-07 21:23:48 372
原创 leetcode subsets问题
Leetcode: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 must not contai
2015-05-06 21:45:08 338
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人