Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 63edc36

Browse files
added one line to string compression
1 parent 1b43791 commit 63edc36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎Kangli/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Return 6, and the first 6 characters of the input array should be: ["a","2","b",
2424
Explanation:
2525
"aa" is replaced by "a2". "bb" is replaced by "b2". "ccc" is replaced by "c3".
2626

27-
Thoughts: Easy if not doing it in place. I made an extra array, added the character and added its count if count > 1.
27+
Thoughts: Easy if not doing it in place. I made an extra array, added the character and added its count
28+
if count > 1. Return the length of new array at the end.
2829
[Submission](https://github.com/kanglicheng/python-leetcode/blob/mySolutions/Kangli/Strings/stringCompression.py)
2930

3031
10/27/17

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /