上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are+, - and *. Example 1 Input: ... 阅读全文
posted @ 2015-11-23 14:47 dylqt 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. For example,Given [3,2,1,5,6,4] and k = 2, return 5. Note:... 阅读全文
posted @ 2015-11-22 19:29 dylqt 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1] has the... 阅读全文
posted @ 2015-11-22 15:16 dylqt 阅读(116) 评论(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 any point in time. The robot is trying to reach the bot... 阅读全文
posted @ 2015-11-22 12:21 dylqt 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted from left to right. The first integer of each ro... 阅读全文
posted @ 2015-11-20 09:19 dylqt 阅读(150) 评论(0) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo... 阅读全文
posted @ 2015-11-07 20:18 dylqt 阅读(139) 评论(0) 推荐(0) 编辑
摘要: You are playing the following Bulls and Cows game with your friend: You write a 4-digit secret number and ask your friend to guess it. Each time your ... 阅读全文
posted @ 2015-11-06 21:38 dylqt 阅读(194) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return... 阅读全文
posted @ 2015-11-06 09:14 dylqt 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.题目大意是,在一个大的字符串haystack中找到一... 阅读全文
posted @ 2015-11-02 08:51 dylqt 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 字符串类(String),熟悉内存管理与拷贝控制类定义#include //#include using std::cout;using std::cin;class String{ using iterator = char *; friend std::ostream &operat... 阅读全文
posted @ 2015-11-01 20:27 dylqt 阅读(326) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 10 下一页