上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 76 下一页
摘要: You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. 阅读全文
posted @ 2020-05-13 08:58 Schwifty 阅读(129) 评论(0) 推荐(0)
摘要: Given an integer n, return 1 - n in lexicographical order. For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9]. Please optimize your algori 阅读全文
posted @ 2020-05-12 10:23 Schwifty 阅读(126) 评论(0) 推荐(0)
摘要: Given an array nums of 0s and 1s and an integer k, return True if all 1's are at least k places away from each other, otherwise return False. Example 阅读全文
posted @ 2020-05-12 09:11 Schwifty 阅读(202) 评论(0) 推荐(0)
摘要: An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
posted @ 2020-05-12 06:05 Schwifty 阅读(156) 评论(0) 推荐(0)
摘要: Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s and t. t is po 阅读全文
posted @ 2020-05-11 12:26 Schwifty 阅读(141) 评论(0) 推荐(0)
摘要: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
posted @ 2020-05-11 11:42 Schwifty 阅读(166) 评论(0) 推荐(0)
摘要: We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron 阅读全文
posted @ 2020-05-11 11:11 Schwifty 阅读(191) 评论(0) 推荐(0)
摘要: In a town, there are N people labelled from 1 to N. There is a rumor that one of these people is secretly the town judge. If the town judge exists, th 阅读全文
posted @ 2020-05-11 09:19 Schwifty 阅读(128) 评论(0) 推荐(0)
摘要: Given an array of integers arr. We want to select three indices i, j and k where (0 <= i < j <= k < arr.length). Let's define a and b as follows: a = 阅读全文
posted @ 2020-05-11 08:41 Schwifty 阅读(272) 评论(0) 推荐(0)
摘要: Given an array target and an integer n. In each iteration, you will read a number from list = {1,2,3..., n}. Build the target array using the followin 阅读全文
posted @ 2020-05-11 06:54 Schwifty 阅读(231) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 76 下一页