上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: * All numbers (including target) will be positive integers. * The solution set must not contain duplicate combinations. 阅读全文
posted @ 2017-05-11 16:59 JeffLai 阅读(211) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as "one 2, then one 1" or 1211. Given an integer n, generate the nth sequence. Note: The sequence of integers will be represented as a string. 阅读全文
posted @ 2017-05-11 16:02 JeffLai 阅读(333) 评论(0) 推荐(0) 编辑
摘要: Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be only one unique solution. 阅读全文
posted @ 2017-05-11 15:38 JeffLai 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(215) 评论(0) 推荐(0) 编辑
摘要: I/O多路复用是在多线程或多进程编程中常用技术。主要是通过select/epoll/poll三个函数支持的。在此主要对select和epoll函数详细介绍。 阅读全文
posted @ 2017-05-10 21:30 JeffLai 阅读(1343) 评论(0) 推荐(0) 编辑
摘要: 网络编程中的5中I/O模型简介以及比较。 阅读全文
posted @ 2017-05-10 16:19 JeffLai 阅读(405) 评论(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 阅读(166) 评论(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) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页