Given a set of keywords words and a string S, make all appearances of all keywords in S bold. Any letters between <b> and </b> tags ...
Given a stringsand a list of stringsdict, you need to add a closed pair of bold tag lt b gt and lt b gt to wrap the substrings in s that exist in dict. If two such substrings overlap, you need to wra ...
2017-06-18 07:02 2 7822 推薦指數:
Given a set of keywords words and a string S, make all appearances of all keywords in S bold. Any letters between <b> and </b> tags ...
To some string S, we will perform some replacement operations that replace groups of letters with new ones (not necessarily the same size). Each ...
Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first string's ...
Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update ...
A magical string S consists of only '1' and '2' and obeys the following rules: The string S is magical because ...
Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like ...
We are given two strings, A and B. A shift on A consists of taking string A and moving the leftmost character to the rightmost position. ...
Given an array of characters, compress it in-place. The length after compression must always be ...