병아리 개발자의 실력 양성기

  • 홈
  • 태그
  • 방명록

BFS 2

그래프 연결성 판정

한 점(node 1)에서 시작하여 연결된 노드를 방문할 때 방문이 되지 않는 점을 찾는 것을 하고자 한다. 문제는 다음에서 가져왔다. https://open.kattis.com/problems/wheresmyinternet Where's My Internet?? – Kattis, Kattis Photo by Jerry John from Flickr A new town is being built far out in the country, and currently there are $N$ houses. People have already started moving in. However, some of the houses aren’t connected to the internet yet, and natural..

알고리즘/Graph 2022.11.19

DFS (스택)와 BFS (큐) 로 풀어보는 BST

BST BST는 node.left.data > t = bintrees.RBTree([(3, 'Ryan'), (2, 'Muzi'), (5, 'Jay-Z'), (1, 'Chunshik')]) >>> t[2] 'Muzi' >>> t.min_item() (1, 'Chunshik') >>> t.max_item() (5, 'Jay-Z') >>> t.insert(8, 'Pengsoo') >>> t RBTree({1: 'Chunshik', 2: 'Muzi', 3: 'Ryan', 5: 'Jay-Z', 8: 'Pengsoo'}) >>> t.discard(5) >>> a = t.pop_min() >>> a (1, 'Chunshik') >>> b = t.pop_max() >>> b (8, 'Pengsoo') >>> t RBT..

알고리즘/Graph 2022.03.10
이전
1
다음
더보기
반응형
프로필사진

병아리 개발자의 실력 양성기

알고리즘 구현 능력을 기르는 과정을 함께 공유하고 성장하고자 합니다

  • 분류 전체보기 (64)
    • Soft Talks (12)
    • 알고리즘 (31)
      • Array (3)
      • Dynamic Programming (9)
      • Graph (9)
      • Sorting and Searching (1)
      • Hash Table (2)
      • Bits (1)
      • Math (3)
    • 머신러닝 (3)
      • Reinforcement Learning (0)
      • Supervised Learning (0)
      • Unsupervised Learning (0)
      • RecSys (추천) (0)
    • 플랫폼 (1)
      • Kafka (0)
      • Mongo DB (0)
      • Docker & k8s (1)
    • IT in General (1)
      • OS (2)
      • C++ (1)
      • Python (6)
    • Quant finance (1)

Tag

빅테크, bintrees, memoization, connected components, python, 카카오, RTE, dfs, 입출력, 엔지니어, dp, coupon collectors' problem, 코테, BFS, 공부법, OJ, lru_cache, cache, 문자열, 합격,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/05   »
일 월 화 수 목 금 토
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.

티스토리툴바