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