Problem Description Give you a number on base ten,you should output it on base two.(0 < n < 1000) Input For each case there is a postive number n on b ...
分类:
其他好文 时间:
2020-04-10 00:29:53
阅读次数:
80
给定一个字符串,找到它的第一个不重复的字符,并返回它的索引。如果不存在,则返回 -1。 案例: s = "leetcode"返回 0. s = "loveleetcode",返回 2. 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/first- ...
分类:
编程语言 时间:
2020-04-10 00:25:43
阅读次数:
86
d地址:https://leetcode-cn.com/problems/implement-strstr/ <?php /** 实现 strStr() 函数。 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 ...
分类:
其他好文 时间:
2020-04-09 17:55:58
阅读次数:
97
106.旋转矩阵 题目链接 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/rotate-matrix-lcci 题目描述 给你一幅由 N × N 矩阵表示的图像,其中每个像素的大小为 4 字节。请你设计一种算法,将图像旋转 90 度。 不占用额 ...
分类:
其他好文 时间:
2020-04-07 22:49:13
阅读次数:
88
此博客链接:https://www.cnblogs.com/ping2yingshi/p/12656345.html 将数组分成和相等的三个部分(43min) 题目链接:https://leetcode-cn.com/problems/partition-array-into-three-parts ...
分类:
编程语言 时间:
2020-04-07 22:29:58
阅读次数:
124
地址:https://leetcode-cn.com/problems/longest-common-prefix/ <?php /** * 编写一个函数来查找字符串数组中的最长公共前缀。 * * 如果不存在公共前缀,返回空字符串 ""。 * * 示例 1: * * 输入: ["flower","f ...
分类:
其他好文 时间:
2020-04-07 22:23:03
阅读次数:
85
Overriding the SDK used with global.json - sort of The solution to SDK versioning problems in projects or Solutions is to use a global.json file in th ...
分类:
Web程序 时间:
2020-04-07 20:01:01
阅读次数:
84
题目连接:https://leetcode-cn.com/problems/ugly-number-ii/solution/ 编写一个程序,找出第 n 个丑数。 丑数就是只包含质因数 2, 3, 5 的正整数。 示例: 输入: n = 10输出: 12解释: 1, 2, 3, 4, 5, 6, 8, ...
分类:
其他好文 时间:
2020-04-07 13:02:42
阅读次数:
71
题目描述 给你一个包含 n 个整数的数组?nums,判断?nums?中是否存在三个元素 a,b,c ,使得?a + b + c = 0 ?请你找出所有满足条件且不重复的三元组。 注意:答案中不可以包含重复的三元组。 示例: 题目链接: https://leetcode cn.com/problems ...
分类:
编程语言 时间:
2020-04-07 12:56:24
阅读次数:
61
题目描述 :我们把只包含因子 2、3 和 5 的数称作丑数(Ugly Number)。求按从小到大的顺序的第 n 个丑数。 解法 1: 动态规划 因为丑数只包含质因数 2, 3, 5,所以对于下个丑数来说,一定是前面某个丑数乘 3、乘 4 或者乘 5 所得。 准备三个指针 ptr2、ptr3、ptr ...
分类:
编程语言 时间:
2020-04-06 23:49:21
阅读次数:
93