阅读背景:

Leetcode: Encode String with Shortest Length && G面经

来源:互联网 
Given a non-empty string, encode the string such that its encoded length is the shortest.

The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times.

Note:
k will be a positive integer and encoded string will not be empty or have extra space.
You may assume that the input string contains only lowercase English letters. The stringempty string, encode the string



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: