引言C#网络编程系列文章计划简单地讲述网络编程方面的基础知识,由于本人在这方面功力有限,所以只能提供一些初步的入门知识,希望能对刚开始学习的朋友提供一些帮助。如果想要更加深入的内容,可以参考相关书籍。本文是该系列第一篇,主要讲述了基于套接字(Socket)进行网络编程的基本概念,其中包括TCP协议、...
分类:
其他好文 时间:
2014-06-16 10:20:04
阅读次数:
205
class Solution {public: vector grayCode(int n)
{ vector res; res.push_back(0); long pow2 = 1; for (int i=1; i <= n; i++...
分类:
其他好文 时间:
2014-06-16 07:11:52
阅读次数:
213
class Solution {private: const static char*
pattern[]; const static char* roman_digit[];public: string intToRoman(int num) {
if (num ...
分类:
其他好文 时间:
2014-06-16 07:04:22
阅读次数:
171
服务器负载均衡体系结构,I:博客分类:读书笔记应用服务器数据结构浏览器网络应用memcached服务器农场的可伸缩性和高可用性Server load
balancing architectures, Part 1: Transport-level load balancingScalability ...
分类:
其他好文 时间:
2014-06-13 18:39:58
阅读次数:
346
给的一个数列中,可能存在重复的数,比如 1 1 2
,求其全排列。记录上一个得出来的排列,看这个排列和上一个是否相同。#include #include #include using namespace std;
class Solution{public: vector > permuteU...
分类:
其他好文 时间:
2014-06-13 17:53:39
阅读次数:
280
class Solution {private: int getDirection(int
A[], int idx, int target, bool isDefaultBack) { int r = A[idx] - target; if (r
== 0) { ...
分类:
其他好文 时间:
2014-06-13 17:37:20
阅读次数:
221
1 public class Solution { 2 public int
lengthOfLongestSubstring(String s) { 3 int length = s.length(); 4 if (length ==
0) return ...
分类:
其他好文 时间:
2014-06-13 08:31:32
阅读次数:
214
Question:Sort a linked list inO(nlogn) time
using constant space complexity.Solution:Merge sort.找到链表的中间的那个ListNode. 1 /** 2
* Definition for singly-l....
分类:
其他好文 时间:
2014-06-12 17:59:34
阅读次数:
285
一次过 1 public class Solution { 2 public String
intToRoman(int num) { 3 StringBuffer res = new StringBuffer(); 4 if (num >
3999 || n...
分类:
其他好文 时间:
2014-06-10 16:12:12
阅读次数:
215