Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- LLM
- visual instruction tuning
- 합성곱 신경망
- pdf parsing
- 파인튜닝
- qlora
- Time Series
- 활성화함수
- anomaly detection
- 딥러닝
- fine tuning
- rag-fusion
- fp32
- multi-query
- Nested Learning
- 이상탐지
- rag parsing
- 활성화 함수
- deep learning
- 데이터 파싱
- rrf
- LLaVA
- Non-Maximum Suppression
- fp16
- gemma3
- bf16
- LLM 패러다임
- Mean squared error
- 오차역전파
- Cross Entropy Error
Archives
- Today
- Total
Attention, Please!!!
[LeetCode] Valid Anagram 본문
문제:
Given two strings s and t, return true if t is an anagram of s, and false otherwise.
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.
Example 1:
Input: s = "anagram", t = "nagaram"
Output: true
Example 2 :
Input: s = "rat", t = "car"
Output: false
Constraints:
- 1 <= s.length, t.length <= 5 * 104
- s and t consist of lowercase English letters.
풀이:
class Solution:
def isAnagram(self, s: str, t: str) -> bool:
if len(s) != len(t):
return False
CountS, CountT = {}, {}
for i in range(len(s):
CountT[t[i]] = 1 + CountT.get(t[i],0)
CountT[t[i]] = 1 + CountT.get(t[i],0)
return CountS == CountT
'Algorithm > Leetcode' 카테고리의 다른 글
| [LeetCode] Product of Array Except Self (0) | 2023.12.14 |
|---|---|
| [LeetCode] SQL 50문제 (진행중) (0) | 2023.10.24 |
| [LeetCode] Two Sum (0) | 2023.10.20 |
| [LeetCode] Valid Sudoku (0) | 2023.10.12 |
| [LeetCode] Contains Duplicate (0) | 2023.10.10 |