上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 33 下一页
摘要: Given a sorted integer array, remove duplicate elements. For each group of elements with the same value keep only one of them. Do this in-place, using 阅读全文
posted @ 2020-02-24 00:13 xuan_abc 阅读(183) 评论(0) 推荐(0)
摘要: Given a rope with positive integer-length n, how to cut the rope into m integer-length parts with length p[0], p[1], ...,p[m-1], in order to get the m 阅读全文
posted @ 2020-02-23 06:16 xuan_abc 阅读(288) 评论(0) 推荐(0)
摘要: Given an integer n, return all distinct solutions to the n-queens puzzle. Each solution contains a distinct board configuration of the n-queens' place 阅读全文
posted @ 2020-02-23 04:44 xuan_abc 阅读(105) 评论(0) 推荐(0)
摘要: Given a binary tree, count the number of nodes in each node’s left subtree, and store it in the numNodesLeft field. Examples 1(6) / \ 2(3) 3(0) / \ 4( 阅读全文
posted @ 2020-02-21 11:56 xuan_abc 阅读(192) 评论(0) 推荐(0)
摘要: Given a string, replace adjacent, repeated characters with the character followed by the number of repeated occurrences. Assumptions The string is not 阅读全文
posted @ 2020-02-21 11:46 xuan_abc 阅读(183) 评论(0) 推荐(0)
摘要: Given a string in compressed form, decompress it to the original string. The adjacent repeated characters in the original string are compressed to hav 阅读全文
posted @ 2020-02-21 11:30 xuan_abc 阅读(226) 评论(0) 推荐(0)
摘要: Given an array of integers that contains only 0s and 1s and a positive integer k, you can flip at most k 0s to 1s, return the longest subarray that co 阅读全文
posted @ 2020-02-21 10:50 xuan_abc 阅读(121) 评论(0) 推荐(0)
摘要: Given a string, find the longest substring without any repeating characters and return the length of it. The input string is guaranteed to be not null 阅读全文
posted @ 2020-02-20 21:26 xuan_abc 阅读(134) 评论(0) 推荐(0)
摘要: Word “book” can be abbreviated to 4, b3, b2k, etc. Given a string and an abbreviation, return if the string matches the abbreviation. Assumptions: The 阅读全文
posted @ 2020-02-20 11:09 xuan_abc 阅读(266) 评论(0) 推荐(0)
摘要: Given an original string input, and two strings S and T, replace all occurrences of S in input with T. Assumptions input, S and T are not null, S is n 阅读全文
posted @ 2020-02-20 10:00 xuan_abc 阅读(371) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 33 下一页