개발공부

개발공부/algorithm

[Leetcode][python] 482: License key formatting - String

Leetcode 482: License key formatting Level: Easy Link License Key Formatting - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com My Approach A simple string slicing problem class Solution: def licenseKeyFormatting(self, s: str, k: int) -> str: s = s.replace('-', '').upper() L = len(s..

개발공부/algorithm

[Leetcode][python] 120: triangle - DP

Leetcode 120: Triangle Level: Medium Link Triangle - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com My Approach Sum up the previous lists values to the current list For the first element and the last element, add up the first element of the last element of the list before. Continu..

개발공부/algorithm

[Leetcode][python] 973: K closest point to the origin

Problem Leetcode - 973: Closest point to the origin Level: Medium Link K Closest Points to Origin - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com My Approach import math class Solution: def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]: coords = [] for p in r..

so.py
'개발공부' 카테고리의 글 목록 (10 Page)