| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Tags
- 알고리즘
- First Unique Character in a String
- Kubernetes
- hackerrank
- 리트코드
- 문제해결
- 2022
- swift
- Count Monobit Integers
- Qualification Round
- LEVEL 2
- K8S
- 3D PRINTING
- 하늘과 바람과 별과 詩
- GitLab
- MySQL
- 코딩테스트
- C++
- ProblemSoving
- Code Jam
- ProblemSolving
- Algorithm
- Code Jam 2022
- leetcode
- 파이썬
- Python
- 하늘과 바람과 별과 시
- 프로그래머스
- 해커랭크
Archives
- Today
- Total
목록Problem Solving (1)
공대생의 비망록
[LeetCode][Easy] Longest Common Prefix 문제 Python 풀이
주어진 문자열 배열 strs에 대하여, 가장 긴 공통문자열을 찾는 문제.예를 들어 "flower", "flow", "flight" 문자열들이 주어졌다면 "fl"을 찾아 반환해야 한다. 문제 풀이:class Solution: def longestCommonPrefix(self, strs: List[str]) -> str: length = 201 # Since the max length for this problem is 200. # length = min(len(w) for w in strs) # Pythonic way for s in strs: # set var length as the shortest string's length. if le..
Programming Language/Python
2026. 2. 9. 18:06