上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 50 下一页
摘要: Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may a 阅读全文
posted @ 2018-03-27 12:52 轻风舞动 阅读(873) 评论(0) 推荐(0) 编辑
摘要: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1 Example 2 Note:Your al 阅读全文
posted @ 2018-03-27 12:05 轻风舞动 阅读(525) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur 阅读全文
posted @ 2018-03-27 04:25 轻风舞动 阅读(1401) 评论(0) 推荐(0) 编辑
摘要: Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm? Hint: 274. H-Index H指数 的拓展。输入的数组是有 阅读全文
posted @ 2018-03-27 02:32 轻风舞动 阅读(479) 评论(0) 推荐(0) 编辑
摘要: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index. According 阅读全文
posted @ 2018-03-27 02:24 轻风舞动 阅读(2327) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assume the 阅读全文
posted @ 2018-03-27 02:09 轻风舞动 阅读(2194) 评论(0) 推荐(1) 编辑
摘要: Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2. Note: 两个只含有数字的字符串相加。 解法: 对于每个字符转成对应的整数,然后相加,结果在写入 阅读全文
posted @ 2018-03-26 09:34 轻风舞动 阅读(567) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between nums[i] and 阅读全文
posted @ 2018-03-26 08:53 轻风舞动 阅读(650) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the  阅读全文
posted @ 2018-03-26 08:50 轻风舞动 阅读(462) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr 阅读全文
posted @ 2018-03-26 08:17 轻风舞动 阅读(719) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 50 下一页