摘要:
Remove adjacent, repeated characters in a given string, leaving only one character for each group of such characters.AssumptionsTry to do it in place.Examples“aaaabbbc” is transferred to “abc”Corner C... 阅读全文
posted @ 2018-04-05 12:43
davidnyc
阅读(184)
评论(0)
推荐(0)
摘要:
Given a string, remove all leading/trailing/duplicated empty spaces.Assumptions:The given string is not null.Examples:“ a” --> “a”“ I love MTV ” --> “I love MTV” 1 public String removeSpaces(... 阅读全文
posted @ 2018-04-05 12:14
davidnyc
阅读(294)
评论(0)
推荐(0)
摘要:
Remove given characters in input string, the relative order of other characters should be remained. Return the new string after deletion.AssumptionsThe given input string is not null.The characters to... 阅读全文
posted @ 2018-04-05 09:05
davidnyc
阅读(165)
评论(0)
推荐(0)
摘要:
Given an integer array of size N - 1, containing all the numbers from 1 to N except one, find the missing number.AssumptionsThe given array is not null, and N >= 1ExamplesA = {2, 1, 4}, the missing nu... 阅读全文
posted @ 2018-04-05 07:15
davidnyc
阅读(173)
评论(0)
推荐(0)
浙公网安备 33010602011771号