일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Deep learning
- 조지아텍
- LV1
- cpp
- EOI
- 기본
- 선형대수
- 매트랩
- mpnp
- 방통대
- MATLAB
- machine learning
- 코딩테스트
- 딥러닝
- 주정부이민
- 캐나다 영주권
- 위니펙
- LAA
- 프로그래머스
- Plotting
- 알고리즘
- 개발자
- 컴퓨터과학과
- leetcode
- 방송통신대학교
- zeros
- 온라인석사
- 머신러닝
- omscs
- C++
- Today
- Total
목록개발 로그/알고리즘 (97)
Byte by Byte
from collections import Counter str에 대해서, 각 char를 key로, 발생 빈도 수를 value를 하는 dict를 만들어줌. str = "hello" Counter(str) 하면 , { 'h' : 1 , 'e' : 1 , 'l' : 2, 'o' : 1 } 이렇게 나옴. dict for loop 는 for key, value in {dict}.items(): class Solution: def canConstruct(self, ransomNote: str, magazine: str) -> bool: from collections import Counter rans = Counter(ransomNote) magz = Counter(magazine) for key,value in..

class Solution { public: vector findDuplicates(vector& nums) { vectorres; mapm; for(int i =0; i

class Solution { public: int maximumPopulation(vector& logs) { int alive[101]={0,}; for(auto log : logs){ for(int i = log[0]-1950; i

🔑 map의 두번째 인자에 vector container도 삽입 가능! class Solution { public: vector groupAnagrams(vector& strs) { vectorres; mapm; for(auto &s : strs) { string tmp = s; sort(tmp.begin(),tmp.end()); m[tmp].push_back(s); } for(auto sub : m) { //cout

class Solution { public: vector findOcurrences(string text, string first, string second) { vectors; vectorres; for(int i =0; i

class Solution { public: int minOperations(vector& logs) { int res =0; for(auto l : logs){ if (l.find("..") != std::string::npos) { if(res!=0) res--; } else if(l.find(".") == std::string::npos){ res++; } } return res; } };

class Solution { public: string reformatNumber(string number) { if(number.size()