上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 64 下一页
摘要: Given a string s and an integer k, rearrange s such that the same characters are at least distance k from each other. If it is not possible to rearran 阅读全文
posted @ 2020-04-14 08:13 CNoodle 阅读(791) 评论(0) 推荐(0)
摘要: Given a string s, rearrange the characters of s so that any two adjacent characters are not the same. Return any possible rearrangement of s or return 阅读全文
posted @ 2020-04-14 06:40 CNoodle 阅读(284) 评论(0) 推荐(0)
摘要: Design a hit counter which counts the number of hits received in the past 5 minutes. Each function accepts a timestamp parameter (in seconds granulari 阅读全文
posted @ 2020-04-14 04:11 CNoodle 阅读(344) 评论(0) 推荐(0)
摘要: Design a logger system that receives a stream of messages along with their timestamps. Each unique message should only be printed at most every 10 sec 阅读全文
posted @ 2020-04-14 02:01 CNoodle 阅读(186) 评论(0) 推荐(0)
摘要: Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list. k is a positive integer and is less than or 阅读全文
posted @ 2020-04-13 07:09 CNoodle 阅读(513) 评论(0) 推荐(0)
摘要: Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i 阅读全文
posted @ 2020-04-12 13:41 CNoodle 阅读(483) 评论(0) 推荐(0)
摘要: We are given a list schedule of employees, which represents the working time for each employee. Each employee has a list of non-overlapping Intervals, 阅读全文
posted @ 2020-04-10 14:27 CNoodle 阅读(717) 评论(0) 推荐(1)
摘要: Given a list of unique words, find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + 阅读全文
posted @ 2020-04-10 06:43 CNoodle 阅读(194) 评论(0) 推荐(0)
摘要: Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can f 阅读全文
posted @ 2020-04-10 05:12 CNoodle 阅读(164) 评论(0) 推荐(0)
摘要: Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace character. Note that after 阅读全文
posted @ 2020-04-10 01:46 CNoodle 阅读(201) 评论(0) 推荐(0)
摘要: Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid answer 阅读全文
posted @ 2020-04-09 13:59 CNoodle 阅读(536) 评论(0) 推荐(0)
摘要: There is a new alien language that uses the English alphabet. However, the order among the letters is unknown to you. You are given a list of strings  阅读全文
posted @ 2020-04-08 06:21 CNoodle 阅读(610) 评论(0) 推荐(0)
摘要: Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by wa 阅读全文
posted @ 2020-04-07 13:05 CNoodle 阅读(255) 评论(0) 推荐(0)
摘要: Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations 阅读全文
posted @ 2020-04-07 00:49 CNoodle 阅读(500) 评论(0) 推荐(0)
摘要: Design and implement a data structure for a Least Frequently Used (LFU) cache. Implement the LFUCache class: LFUCache(int capacity) Initializes the ob 阅读全文
posted @ 2020-04-06 09:01 CNoodle 阅读(285) 评论(0) 推荐(0)
摘要: Given the availability time slots arrays slots1 and slots2 of two people and a meeting duration duration, return the earliest time slot that works for 阅读全文
posted @ 2020-04-05 06:54 CNoodle 阅读(1334) 评论(0) 推荐(0)
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Example 1: Input: n = 3 Output: ["((()))","(() 阅读全文
posted @ 2020-04-04 14:47 CNoodle 阅读(445) 评论(0) 推荐(0)
摘要: You are given a string s and an array of strings words of the same length. Return all starting indices of substring(s) in s that is a concatenation of 阅读全文
posted @ 2020-04-04 08:01 CNoodle 阅读(438) 评论(0) 推荐(0)
摘要: Given an integer array nums and an integer k, return the number of good subarrays of nums. A good array is an array where the number of different inte 阅读全文
posted @ 2020-04-04 06:06 CNoodle 阅读(498) 评论(0) 推荐(1)
摘要: You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can 阅读全文
posted @ 2020-04-04 01:21 CNoodle 阅读(215) 评论(0) 推荐(0)
上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 64 下一页