archives

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

2022/02 1

leetcode 1995, 2078(two pointer), 744(이분 탐색)

1995 https://leetcode.com/problems/count-special-quadruplets/ easy문제인데 O(n^2)의 시간복잡도로 풀려고 생각해보자. a+b+c=d가 나와야 하는데 c를 넘기면 a+b=d-c로 만들수 있다. 그리고 요 두파트를 각각 계산하면 된다. https://leetcode.com/problems/count-special-quadruplets/discuss/1446988/JavaC%2B%2BPython3-Real-O(n2)-solution class Solution: def countQuadruplets(self, nums: List[int]) -> int: # a + b = d - c d = {} ret = 0 n = len(nums) for i in rang..

algorithm/problem solving 2022.02.23
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

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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

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

티스토리툴바