File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 127
127
| 463 | [ Island Perimeter] ( https://leetcode.com/problems/island-perimeter ) | Easy | [ ![ Java] ( https://img.icons8.com/color/40/000000/java-coffee-cup-logo.png )] ( src/IslandPerimeter.java ) [ ![ Python] ( https://img.icons8.com/color/35/000000/python.png )] ( python/island_perimeter.py ) |
128
128
| 475 | [ Heaters] ( https://leetcode.com/problems/heaters ) | Medium | [ ![ Java] ( https://img.icons8.com/color/40/000000/java-coffee-cup-logo.png )] ( src/Heaters.java ) [ ![ Python] ( https://img.icons8.com/color/35/000000/python.png )] ( python/heaters.py ) |
129
129
| 476 | [ Number Complement] ( https://leetcode.com/problems/number-complement ) | Easy | [ ![ Java] ( https://img.icons8.com/color/40/000000/java-coffee-cup-logo.png )] ( src/NumberComplement.java ) [ ![ Python] ( https://img.icons8.com/color/35/000000/python.png )] ( python/number_complement.py ) |
130
- | 482 | [ License Key Formatting] ( https://leetcode.com/problems/license-key-formatting ) | Easy | [ ![ Java] ( https://img.icons8.com/color/40/000000/java-coffee-cup-logo.png )] ( src/LicenseKeyFormatting.java ) |
130
+ | 482 | [ License Key Formatting] ( https://leetcode.com/problems/license-key-formatting ) | Easy | [ ![ Java] ( https://img.icons8.com/color/40/000000/java-coffee-cup-logo.png )] ( src/LicenseKeyFormatting.java ) [ ![ Python ] ( https://img.icons8.com/color/35/000000/python.png )] ( python/license_key_formatting.py ) |
131
131
| 485 | [ Max Consecutive Ones] ( https://leetcode.com/problems/max-consecutive-ones ) | Easy | [ ![ Java] ( https://img.icons8.com/color/40/000000/java-coffee-cup-logo.png )] ( src/MaxConsecutiveOnes.java ) |
132
132
| 492 | [ Construct the Rectangle] ( https://leetcode.com/problems/construct-the-rectangle ) | Easy | [ ![ Java] ( https://img.icons8.com/color/40/000000/java-coffee-cup-logo.png )] ( src/ConstructTheRectangle.java ) [ ![ Python] ( https://img.icons8.com/color/35/000000/python.png )] ( python/construct_the_rectangle.py ) |
133
133
| 496 | [ Next Greater Element I] ( https://leetcode.com/problems/next-greater-element-i ) | Easy | [ ![ Java] ( https://img.icons8.com/color/40/000000/java-coffee-cup-logo.png )] ( src/NextGreaterElementI.java ) [ ![ Python] ( https://img.icons8.com/color/35/000000/python.png )] ( python/next_greater_element_i.py ) |
Original file line number Diff line number Diff line change
1
+ class Solution :
2
+ def licenseKeyFormatting (self , s : str , k : int ) -> str :
3
+ s = s .replace ('-' , '' ).upper ()[::- 1 ]
4
+ return '-' .join (s [i :i + k ] for i in range (0 , len (s ), k ))[::- 1 ]
You can’t perform that action at this time.
0 commit comments