上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 23 下一页
摘要: Problem : Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: 1. The input array will only contain 0 and 1 阅读全文
posted @ 2020-04-13 20:50 littledy 阅读(97) 评论(0) 推荐(0)
摘要: Problem : Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order as shown in the below image. Examp 阅读全文
posted @ 2020-04-13 20:29 littledy 阅读(78) 评论(0) 推荐(0)
摘要: Problem : Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image be 阅读全文
posted @ 2020-04-13 17:03 littledy 阅读(78) 评论(0) 推荐(0)
摘要: Problem : A magical string S consists of only '1' and '2' and obeys the following rules: The string S is magical because concatenating the number of c 阅读全文
posted @ 2020-04-13 16:09 littledy 阅读(95) 评论(0) 推荐(0)
摘要: Problem : Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Example 1: 阅读全文
posted @ 2020-04-13 11:57 littledy 阅读(99) 评论(0) 推荐(0)
摘要: Problem : The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find 阅读全文
posted @ 2020-04-13 11:49 littledy 阅读(94) 评论(0) 推荐(0)
摘要: Problem : Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Example 2: Example 3: 思路 : Solution (C++) : 性能 阅读全文
posted @ 2020-04-13 00:25 littledy 阅读(86) 评论(0) 推荐(0)
摘要: Problem : Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non space characters. Please note that t 阅读全文
posted @ 2020-04-12 19:06 littledy 阅读(85) 评论(0) 推荐(0)
摘要: Problem : Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that 阅读全文
posted @ 2020-04-12 18:57 littledy 阅读(64) 评论(0) 推荐(0)
摘要: Problem : Given a positive integer n and you can do operations as follow: If n is even, replace n with n/2. If n is odd, you can replace n with either 阅读全文
posted @ 2020-04-12 16:43 littledy 阅读(86) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 23 下一页