摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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( 阅读全文
摘要:
Given a string, replace adjacent, repeated characters with the character followed by the number of repeated occurrences. Assumptions The string is not 阅读全文
摘要:
Given a string in compressed form, decompress it to the original string. The adjacent repeated characters in the original string are compressed to hav 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
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 阅读全文