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