上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 119 下一页
摘要: [LeetCode] Anagrams Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. 思路: Anagrams指几个 阅读全文
posted @ 2018-09-15 23:37 鸭子船长 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Implement pow(x, n). AC: class Solution { public: double pow(double x, int n) { if(x == 0 && n == 0) return 1; if(x == 0) return 0; if(n == 0) re 阅读全文
posted @ 2018-09-15 23:25 鸭子船长 阅读(228) 评论(0) 推荐(0) 编辑
摘要: N-Queens The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, re 阅读全文
posted @ 2018-09-15 23:10 鸭子船长 阅读(294) 评论(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 阅读全文
posted @ 2018-09-13 23:16 鸭子船长 阅读(329) 评论(0) 推荐(0) 编辑
摘要: I: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your ma 阅读全文
posted @ 2018-09-13 22:47 鸭子船长 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Given a collection of intervals, merge all overlapping intervals. For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18]. 合并有重叠的区间,且原区 阅读全文
posted @ 2018-09-13 22:35 鸭子船长 阅读(285) 评论(0) 推荐(0) 编辑
摘要: Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initia 阅读全文
posted @ 2018-09-13 22:23 鸭子船长 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1 基本解释:extern可以置于变量或者函数前,以标示变量或者函数的定义在别的文件中,提示编译器遇到此变量和函数时在其他模块中寻找其定义。此外extern也可用来进行链接指定。 也就是说extern有两个作用,第一个,当它与"C"一起连用时,如: extern "C" void fun(int a 阅读全文
posted @ 2018-09-13 16:16 鸭子船长 阅读(261) 评论(0) 推荐(0) 编辑
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2018-09-13 00:10 鸭子船长 阅读(254) 评论(0) 推荐(0) 编辑
摘要: I: Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: Yo 阅读全文
posted @ 2018-09-13 00:03 鸭子船长 阅读(250) 评论(0) 推荐(0) 编辑
上一页 1 ··· 36 37 38 39 40 41 42 43 44 ··· 119 下一页