摘要: Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled with the character '.'. 阅读全文
posted @ 2017-05-10 22:48 JeffLai 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array. 阅读全文
posted @ 2017-05-10 21:48 JeffLai 阅读(216) 评论(0) 推荐(0) 编辑
摘要: I/O多路复用是在多线程或多进程编程中常用技术。主要是通过select/epoll/poll三个函数支持的。在此主要对select和epoll函数详细介绍。 阅读全文
posted @ 2017-05-10 21:30 JeffLai 阅读(1354) 评论(0) 推荐(0) 编辑
摘要: 网络编程中的5中I/O模型简介以及比较。 阅读全文
posted @ 2017-05-10 16:19 JeffLai 阅读(410) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in the order of O(log n). If the target is not found in the array, return [-1, -1]. 阅读全文
posted @ 2017-05-10 15:23 JeffLai 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a target value to search. If found in the array return its index, otherwise return -1. You may assume no duplicate exists in the array. 阅读全文
posted @ 2017-05-10 11:56 JeffLai 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. 阅读全文
posted @ 2017-05-10 11:01 JeffLai 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order). The replacement must be in-place, do not allocate extra memory. 阅读全文
posted @ 2017-05-10 10:30 JeffLai 阅读(142) 评论(0) 推荐(0) 编辑