- 博客(12)
- 资源 (3)
- 收藏
- 关注
转载 QQ通信原理及如何穿内网进行通信
QQ是一个基于TCP/UDP协议的通讯软件 发送消息的时候是UDP打洞,登陆的时候使用HTTP~因为登陆服务器其实就是一个HTTP服务器,只不过不是常用的那些,那个服务器是腾讯自行开发的!!! 一、登录 QQ客户端在局域网内,当你打开QQ登录到QQ服务器时,通过外网,你的客户端与QQ服务器建立了一个长连接。你可以用netstat -bn 看到此连接的状态是 e
2014-08-19 15:57:57 726
原创 Leetcode Merge k Sorted Lists
原题Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.
2014-05-23 21:43:43 642
原创 Leetcode Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the
2014-05-23 20:16:11 684
转载 LeetCode 求和问题总结(2sum,3sum,ksum)
求和问题总结(leetcode 2Sum, 3Sum, 4Sum, K Sum)前言:做过leetcode的人都知道, 里面有2sum, 3sum(closest), 4sum等问题, 这些也是面试里面经典的问题, 考察是否能够合理利用排序这个性质, 一步一步得到高效的算法. 经过总结, 本人觉得这些问题都可以使用一个通用的K sum求和问题加以概括消化, 这里我们先直接给出K
2014-04-26 17:24:51 4331 1
原创 Longest Palindromic Substring (c++)
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 palindromic substring.
2014-04-25 12:41:45 1012
原创 Add Two Numbers (c++)
题目:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as
2014-04-25 12:41:19 827
原创 Leetcode 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 "abcabcbb" is "abc", which the length is 3. Fo
2014-04-22 21:04:08 779
转载 Python 的内建函数
转自博文:http://blog.csdn.net/diaoxuesong/article/details/10307409
2014-04-22 20:02:18 846
原创 LeetCodeOJ Two Sum (python)
题目: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 two numbers such that they add up to the targ
2014-03-29 20:52:00 942
转载 python中类中函数参数self的说明
原文:http://sjolzy.cn/Why-should-self-Python.html 类的方法与普通的函数只有一个特别的区别——它们必须有一个额外的第一个参数名称,但是在调用这个方法的时候你不为这个参数赋值,Python会提供这个值。这个特别的变量指对象本身,按照惯例它的名称是self。 虽然你可以给这个参数任何名称,但是强烈建议你使用self这个
2014-03-29 19:47:45 6096
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人