上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 37 下一页
摘要: Given a binary array, find the maximum number of consecutive 1s in this array if you can flip at most one 0. Example 1: Note: The input array will onl 阅读全文
posted @ 2019-08-17 15:50 fatttcat 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length 阅读全文
posted @ 2019-08-17 15:33 fatttcat 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Design an algorithm to encode a list of strings to a string. The encoded string is then sent over the network and is decoded back to the original list 阅读全文
posted @ 2019-08-16 15:45 fatttcat 阅读(192) 评论(0) 推荐(0) 编辑
摘要: You have a list of words and a pattern, and you want to know which words in words matches the pattern. A word matches the pattern if there exists a pe 阅读全文
posted @ 2019-08-15 15:40 fatttcat 阅读(133) 评论(0) 推荐(0) 编辑
摘要: To some string S, we will perform some replacement operations that replace groups of letters with new ones (not necessarily the same size). Each repla 阅读全文
posted @ 2019-08-15 15:16 fatttcat 阅读(163) 评论(0) 推荐(0) 编辑
摘要: We are given two strings, A and B. A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, 阅读全文
posted @ 2019-08-15 07:11 fatttcat 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positi 阅读全文
posted @ 2019-08-12 15:53 fatttcat 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. E 阅读全文
posted @ 2019-08-12 15:36 fatttcat 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an input string , reverse the string word by word. Example: Input: ["t","h","e"," ","s","k","y"," ","i","s"," ","b","l","u","e"] Output: [& 阅读全文
posted @ 2019-08-12 15:20 fatttcat 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an input string, reverse the string word by word. Example 1: Example 2: Example 3: Note: A word is defined as a sequence of non-space characters 阅读全文
posted @ 2019-08-12 15:08 fatttcat 阅读(149) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 37 下一页