파이썬

개발공부/algorithm

[Leetcode][python] 1528. Shuffle String

Problem Leetcode 1528. Shuffle String Level: Easy Link Shuffle String - 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 Code class Solution(object): def restoreString(self, s, indices): listShuffle = list(s) for x in range(len(s)): listShuffle[indices[x]] = s[x] return ''.join(l..

개발공부/algorithm

[Leetcode][python] 14. Longest Common Prefix

Problem Leetcode 14. Longest Common Prefix Level: Easy Link Longest Common Prefix - 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 Code class Solution: def longestCommonPrefix(self, strs: List[str]) -> str: strs, temp = sorted(strs),"" for i in range(len(strs[0])): if strs[0][i..

개발공부/algorithm

[leetcode][python] 278. First Bad Version - Binary Search

Problem Leetcode 278: First Bad version Level: Easy Link First Bad Version - 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 Code 기본적인 이진탐색 문제다. 이진 탐색을 진행해주며 가장 먼저 발생하는 bad version을 체크해준다. # The isBadVersion API is already defined for you. # @param version, an integer # @return ..

so.py
'파이썬' 태그의 글 목록 (2 Page)