原创 Spiral Matrix
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For examp
原创 Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can on
原创 Linux文件鎖
Linux 中的文件鎖 Linux 支持的文件鎖技術主要包括勸告鎖(advisory lock)和強制鎖(mandatory lock)這兩種。此外,Linux 中還引入了兩種強制鎖的變種形式:共享模式強制鎖(share-mode
原创 Leetcode--Sum Root to Leaf Numbers
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example
原创 Leetcode--Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the
原创 Leetcode--Search for a Range
Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's
原创 Leetcode--Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new le
原创 Unique Paths II
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would t
原创 TCP狀態遷移圖
繪製TCP狀態遷移圖,可以根據TCP的三次握手、四次握手、同時打開以及同時關閉。 1)TCP的連接與關閉 2)同時打開 3)同時關閉 TCP狀態遷移圖 注: Listen函數把一個爲調用connect的套接字轉換成一個
原创 TCP的交互式數據流、TCP的成塊數據流、TCP超時和重傳、TCP堅持定時器、TCP保活定時器
TCP的交互式數據流 1)經受時延的確認 TCP的交互式數據流通常使用“經過時延的確認”技術。通常服務器在接收到從客戶端發送過來的數據時,並不馬上發
原创 Leetcode--Find Minimum in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4
原创 Partition List
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or
原创 Reverse Linked List II
Reverse a linked list from position m to n. Do it in-place and in one-pass. For example: Given 1->2->3->4->5->NULL
原创 Leecode--Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow
原创 Leetcode--Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Hide Tags Div