mydailylogs

mydailylogs

  • 분류 전체보기 (115)
    • Kafka (1)
      • Debezium CDC (1)
    • Archieve (110)
      • Elastic Stack (1)
      • AI (3)
      • etc (2)
      • errors (5)
      • CS (20)
      • OS (18)
      • Linux OS (2)
      • 알고리즘 (26)
      • DevOps (8)
      • Cloud Service (5)
      • Airflow (3)
      • Python (3)
      • Go (4)
      • Data Engineering (9)
      • Programming Language (0)
      • Kafka (1)
  • 홈
  • 태그
  • Github
RSS 피드
로그인
로그아웃 글쓰기 관리

mydailylogs

컨텐츠 검색

태그

airflow 캐시 greedy git 충돌 Python Dual Stack 광물캐기 kuberntes kafka Binary Search two pointer SIIT 동기화 경쟁 상태 cache logging sliding window Zookeeper 위험 궤적 IPv6 헤더

최근글

댓글

공지사항

아카이브

greedy(4)

  • [Leetcode] 649. Dota2 Senate

    🗓️ Daily LeetCoding Challenge May, Day 4 class Solution: def predictPartyVictory(self, senate: str) -> str: A = collections.deque() people = [0, 0] bans = [0, 0] for person in senate: x = person == 'R' people[x] += 1 A.append(x) while all(people): x = A.popleft() people[x] -= 1 if bans[x]: bans[x] -= 1 else: people[x] +=1 bans[x^1] += 1 A.append(x) return 'Radiant' if people[1] else 'Dire'

    2023.05.05
  • [Leetcode] 121. Best Time to Buy and Sell Stock

    Time Complexity: O(N) Space Complexity: O(N) (Worst -> len(maxlist) = n/2 class Solution: def maxProfit(self, prices: List[int]) -> int: if len(prices) 0: minlist.append(prices[n2] - prices[n1]) n1 = i n2 = i + 1 elif prices[i+1] > prices[n2]: n2 = i + 1 if prices[n2]..

    2023.05.02
  • [Leetcode 334] 334. Increasing Triplet Subsequence

    class Solution: def increasingTriplet(self, nums: List[int]) -> bool: n1 = n2 = float('inf') for n in nums: if n < n1: n1 = n elif n1 < n < n2: n2 = n elif n1 < n2 < n: return True return False

    2023.05.02
  • [Leetcode] 11. Container With Most Water

    class Solution: def maxArea(self, height: List[int]) -> int: left, right = 0, len(height)-1 result = 0 while left

    2023.04.27
이전
1
다음
티스토리
© 2018 TISTORY. All rights reserved.

티스토리툴바