摘要:
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)