일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 잡생각
- 쓰릴오브파이트
- Daily Challenge
- 영어원서읽기
- 30분
- 영어공부
- leetcode
- 파비최
- Writing
- 미드시청
- Problem Solving
- 스탭퍼
- 뭐든
- 개발자
- FIT XR
- 리얼 클래스
- 운동
- 3줄정리
- 괜찮음
- 읽기
- 매일
- 링피트
- 월간
- 10분
- 만화도
- 사이드
- realclass
- 화상영어
- 프로젝트
- English
Archives
- Today
- Total
파비의 매일매일 공부기록
2023.10.04 Today's Challenge 본문
https://leetcode.com/problems/design-hashmap/
LeetCode - The World's Leading Online Programming Learning Platform
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
매우 간단한 문제
class MyHashMap:
def __init__(self):
self.map = {}
def put(self, key: int, value: int) -> None:
self.map[key] = value
def get(self, key: int) -> int:
value = self.map.get(key)
return value if value != None else -1
def remove(self, key: int) -> None:
self.map[key] = None
반응형
'Problem Solving > LeetCode' 카테고리의 다른 글
2023.10.06 Today's Challenge (0) | 2023.10.06 |
---|---|
2023.10.05 Today's Challenge (0) | 2023.10.05 |
2023.10.03 Today's Challenge (0) | 2023.10.03 |
2023.10.02 Today's Challenge (0) | 2023.10.02 |
2023.10.01 Today's Challenge (0) | 2023.10.01 |
Comments