上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 76 下一页
摘要: Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Input: "hello" Output: "holle" Example 2: Input: "le 阅读全文
posted @ 2018-11-05 15:14 bernieloveslife 阅读(108) 评论(0) 推荐(0)
摘要: In a string composed of 'L', 'R', and 'X' characters, like "RXXLRXRXL", a move consists of either replacing one occurrence of "XL" with "LX", or repla 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(216) 评论(0) 推荐(0)
摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. Example: Input: n = 4, k = 2 Output: [ [2,4], [3,4], [2,3], 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(110) 评论(0) 推荐(0)
摘要: There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every second bulb. On the third round, you toggle every 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(113) 评论(0) 推荐(0)
摘要: Given a complete binary tree, count the number of nodes. Note: Definition of a complete binary tree from Wikipedia: In a complete binary tree every le 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(110) 评论(0) 推荐(0)
摘要: Given a string S of digits, such as S = "123456579", we can split it into a Fibonacci like sequence [123, 456, 579]. Formally, a Fibonacci like sequen 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(189) 评论(0) 推荐(0)
摘要: Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the f 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(173) 评论(0) 推荐(0)
摘要: In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as 阅读全文
posted @ 2018-11-05 15:13 bernieloveslife 阅读(128) 评论(0) 推荐(0)
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the purpose of this problem, w 阅读全文
posted @ 2018-11-03 12:00 bernieloveslife 阅读(111) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y 阅读全文
posted @ 2018-11-03 12:00 bernieloveslife 阅读(86) 评论(0) 推荐(0)
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 76 下一页