摘要: Word SearchGiven a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, wh... 阅读全文
posted @ 2015-05-07 12:49 imKirin 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Right Side ViewGiven a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered fr... 阅读全文
posted @ 2015-05-06 11:26 imKirin 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Number of IslandsGiven a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by con... 阅读全文
posted @ 2015-05-06 10:03 imKirin 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Bitwise AND of Numbers RangeGiven a range [m, n] where 0 >= 1) lena++; while(b >>= 1) lenb++; if(lena == lenb) { for(int i = m... 阅读全文
posted @ 2015-05-05 18:39 imKirin 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Happy NumberWrite an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any posi... 阅读全文
posted @ 2015-05-05 16:59 imKirin 阅读(103) 评论(0) 推荐(0) 编辑
摘要: Remove Linked List ElementsRemove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,va... 阅读全文
posted @ 2015-05-05 16:16 imKirin 阅读(87) 评论(0) 推荐(0) 编辑
摘要: Reverse Linked ListReverse a singly linked list.click to show more hints.Have you met this question in a real interview?class Solution{public: ListNo... 阅读全文
posted @ 2015-05-05 10:36 imKirin 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Count PrimesDescription:Count the number of prime numbers less than a non-negative number,nclick to show more hints.References:How Many Primes Are The... 阅读全文
posted @ 2015-05-04 19:49 imKirin 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Isomorphic StringsGiven two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All... 阅读全文
posted @ 2015-05-04 10:57 imKirin 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1,建立连接 在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接,如图1所示。(1)第一次握手:建立连接时,客户端A发送SYN包(SYN=j)到服务器B,并进入SYN_SEND状态,等待服务器B确认。(2)第二次握手:服务器B收到SYN包,必须确认客户A的SYN(ACK=j... 阅读全文
posted @ 2015-04-23 15:44 imKirin 阅读(6444) 评论(0) 推荐(0) 编辑