-
Notifications
You must be signed in to change notification settings - Fork 0
syncerpn/leetcode
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Sorry, we had to truncate this directory to 1,000 files. 489 entries were omitted from the list. | ||||
Repository files navigation
# simple string manip class Solution: def licenseKeyFormatting(self, s: str, k: int) -> str: s = "".join(s.split("-")).upper() f = len(s) % k prefix = s[:f] p = [s[f+i*k:f+i*k+k] for i in range(len(s) // k)] if prefix: p = [prefix] + p return "-".join(p)
About
No description, website, or topics provided.
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published