摘要: 什么是TCP? TCP的三次握手? 所谓三次握手,即建立TCP连接,也就是指建立一个TCP连接时,需要客户端和服务端总共发送3个包以确认连接的建立。在socket编程中,这一过程由客户端进行connect来触发,整个流程图如下: 第一次握手:客户端(Client)将标志位SYN置为1,随机产生一个值 阅读全文
posted @ 2017-11-12 16:58 涛声依旧~ 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 题目描述 A message containing letters fromA-Zis being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded mes 阅读全文
posted @ 2017-11-12 16:45 涛声依旧~ 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given t 阅读全文
posted @ 2017-11-12 16:15 涛声依旧~ 阅读(329) 评论(0) 推荐(0) 编辑
摘要: 题目描述 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 followi 阅读全文
posted @ 2017-11-12 15:46 涛声依旧~ 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-11-11 20:29 涛声依旧~ 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-11-11 20:28 涛声依旧~ 阅读(109) 评论(0) 推荐(0) 编辑
摘要: PV操作的含义 PV操作由P操作原语和V操作原语组成(原语是不可中断的过程),对信号量进行操作,具体定义如下: P(S):①将信号量S的值减1,即S=S-1; ②如果S>=0,则该进程继续执行;否则该进程置为等待状态,排入等待队列。 V(S):①将信号量S的值加1,即S=S+1; ②如果S>0,则该 阅读全文
posted @ 2017-11-11 20:28 涛声依旧~ 阅读(1132) 评论(0) 推荐(0) 编辑
摘要: 题目描述 A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at 阅读全文
posted @ 2017-11-11 19:10 涛声依旧~ 阅读(302) 评论(0) 推荐(0) 编辑
摘要: 题目描述 The gray code(格雷码) is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the 阅读全文
posted @ 2017-11-11 17:18 涛声依旧~ 阅读(296) 评论(0) 推荐(0) 编辑
摘要: B-Tree | Set 1 (construct) Following is an example B-Tree of minimum degree 3. Note that in practical B-Trees, the value of minimum degree is much mor 阅读全文
posted @ 2017-11-09 14:15 涛声依旧~ 阅读(1314) 评论(0) 推荐(0) 编辑