일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Class
- Protocol
- Generator
- attribute
- iterator
- 프로그래머스
- LeetCode
- 315. Count of Smaller Numbers After Self
- Regular Expression
- t1
- kaggle
- 715. Range Module
- Decorator
- 밴픽
- Substring with Concatenation of All Words
- data science
- 운영체제
- 시바견
- DWG
- 30. Substring with Concatenation of All Words
- 109. Convert Sorted List to Binary Search Tree
- Python Implementation
- Python Code
- 43. Multiply Strings
- Python
- shiba
- Convert Sorted List to Binary Search Tree
- 컴퓨터의 구조
- concurrency
- 파이썬
Archives
- Today
- Total
목록DFA (1)
Scribbling
LeetCode: 65. Valid Number
First solution is using regular expression. Below is some useful patterns. Integer: ^[+-]?\d+$ Flaot: ^[+-]?((\d+(\.\d*)?)|(\.\d+))$ Sicnetific notation: ^[+-]?((\d+(\.\d*)?)|(\.\d+))[eE][+-]?\d+$ class Solution: def isNumber(self, s: str) -> bool: import re pat = re.compile('(^[+-]?((\d+(\.\d*)?)|(\.\d+))$)|(^[+-]?((\d+(\.\d*)?)|(\.\d+))[eE][+-]?\d+$)') return re.match(pat, s) Second solution i..
Computer Science/Coding Test
2022. 1. 20. 14:20