일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Regular Expression
- 시바견
- Protocol
- DWG
- Generator
- Substring with Concatenation of All Words
- 파이썬
- LeetCode
- 밴픽
- t1
- Decorator
- Class
- 30. Substring with Concatenation of All Words
- attribute
- Python Code
- Python Implementation
- 프로그래머스
- 715. Range Module
- shiba
- 컴퓨터의 구조
- 43. Multiply Strings
- 109. Convert Sorted List to Binary Search Tree
- iterator
- data science
- 운영체제
- kaggle
- 315. Count of Smaller Numbers After Self
- Python
- concurrency
- Convert Sorted List to Binary Search Tree
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