上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 37 下一页
摘要: Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Example 2: Input: "leetcode" Output: "leotcede" Exam 阅读全文
posted @ 2019-08-12 12:07 fatttcat 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there ar 阅读全文
posted @ 2019-08-11 15:09 fatttcat 阅读(80) 评论(0) 推荐(0) 编辑
摘要: Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equal letters, and removing them. We repeatedly make 阅读全文
posted @ 2019-08-11 14:40 fatttcat 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Given a list of dominoes, dominoes[i] = [a, b] is equivalentto dominoes[j] = [c, d] if and only if either (a==c and b==d), or (a==d and b==c) - that i 阅读全文
posted @ 2019-08-11 14:39 fatttcat 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window. Example: use queue to keep track of 阅读全文
posted @ 2019-08-11 14:17 fatttcat 阅读(114) 评论(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 @ 2019-08-10 16:20 fatttcat 阅读(118) 评论(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 @ 2019-08-10 16:01 fatttcat 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array nums, remove the duplicates in-placesuch that duplicates appeared at most twice and return the new length. Do not allocate extra 阅读全文
posted @ 2019-08-10 13:50 fatttcat 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Given a string S, remove the vowels 'a', 'e', 'i', 'o', and 'u' from it, and return the new string. Example 1: Example 2: Note: 阅读全文
posted @ 2019-08-10 12:30 fatttcat 阅读(246) 评论(0) 推荐(0) 编辑
摘要: Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar 阅读全文
posted @ 2019-08-10 08:48 fatttcat 阅读(102) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 37 下一页