上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 28 下一页
摘要: 题目: Given an array, rotate the array to the right by k steps, where k is non-negative. 给定一个数组,将数组向右旋转k步,其中k为非负数。 Example 1: Example 2: Note: Try to co 阅读全文
posted @ 2018-09-21 09:48 chan_ai_chao 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quali 阅读全文
posted @ 2018-09-20 17:17 chan_ai_chao 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目: Count the number of prime numbers less than a non-negative number, n. 计算小于非负数n的素数的数量。 Example: 解答: 方法一:超时 方法二: 详解: 判断素数:埃拉托斯特尼筛法 遍历2到根号n,将质数2的全部倍数 阅读全文
posted @ 2018-09-20 16:39 chan_ai_chao 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a positive integer, return its corresponding column title as appear in an Excel sheet. 给定正整数,返回Excel工作表中显示的相应列标题。 For example: Example 1: Ex 阅读全文
posted @ 2018-09-20 15:35 chan_ai_chao 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time comp 阅读全文
posted @ 2018-09-20 15:00 chan_ai_chao 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 题目: A robot on an infinite grid starts at point (0, 0) and faces north. The robot can receive one of three possible types of commands: 无限网格上的机器人从点(0,0 阅读全文
posted @ 2018-09-20 11:07 chan_ai_chao 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an 阅读全文
posted @ 2018-09-20 10:15 chan_ai_chao 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. 给定一个字符串,确定它是否是回文,只考虑字母数字字符并忽略大小写。 No 阅读全文
posted @ 2018-09-19 09:57 chan_ai_chao 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 题目: Reverse bits of a given 32 bits unsigned integer. 给定32位无符号整数的反转位。 Example: Input: 43261596 Output: 964176192 Explanation: 43261596 represented in 阅读全文
posted @ 2018-09-18 15:19 chan_ai_chao 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will 阅读全文
posted @ 2018-09-18 15:03 chan_ai_chao 阅读(85) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 28 下一页