archives

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

2021/12/11 1

leetcode 227(basic calculator), 1197(bfs, dp등), 1010(2sum 다른버전), 526(dp)

227 https://leetcode.com/problems/basic-calculator-ii/ 이전 부호의 상태값을 저장해놨다가 그걸 기반으로 푼다. 이런 계산기반의 문제는 보통 부호를 한번 저장해놓고 다음단계에 가져와서 쓰는식으로 하는것 같다. 하드문제인 https://leetcode.com/problems/basic-calculator/ 와 비교해보면서 익히자. class Solution: def calculate(self, s: str) -> int: num = 0 stack = [] sign = '+' i = 0 while i < len(s): #print(s[i],stack) if s[i].isdigit(): num = num * 10 + int(s[i]) if s[i] in '+-*/' o..

algorithm/problem solving 2021.12.11
1
더보기
프로필사진

프로그래밍 좋아합니다. 자료 퍼가실때는 참조만 적어주세요..

  • study (975)
    • setting, git, shell etc (21)
    • machine learning, image (27)
    • data engineering (94)
    • Python (140)
      • 2.7 information (74)
      • 2.7 simple coding(+ c++) (42)
      • 2.7 for fun. (24)
    • web (27)
      • back + front (22)
      • etc (5)
      • kotlin (0)
    • algorithm (210)
      • theory (51)
      • problem solving (159)
    • webhacking (180)
      • sql, sql injection (98)
      • client (28)
      • etc (54)
    • systemhacking (34)
      • practice (25)
      • background (9)
    • private (241)
      • 면접 (0)
      • memo (56)
      • Vancouver diary (77)
      • business trip (10)
      • normal diary (81)
      • English (17)

Tag

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2021/12   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

  • Hide
  • 지훈현서님 (python developer)
  • 백준 온라인 저지 블로그.(매우 유용)

티스토리툴바