본문 바로가기

HJW's IT Blog

검색하기
HJW's IT Blog
프로필사진 kiki1875

  • 분류 전체보기 (179)
    • 개발 개념 (10)
    • NestJS (0)
    • 컴퓨터 네트워크 (19)
    • 알고리즘 (15)
    • OS (14)
    • Algorithm (41)
    • Database (6)
    • WEB (0)
    • 정보보호 (8)
    • Spring (20)
    • Java (10)
    • AWS (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2024/10   »
일 월 화 수 목 금 토
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
Tags
  • lombok
  • Dependency Injection
  • java
  • Spring
  • Google OAuth
  • 일급 컬렉션
  • OAuth 2.0
  • 일급 객체
  • builder
  • Volatile
  • spring security
  • synchronized
  • factory
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록2024/10/15 (1)

HJW's IT Blog

[프로그래머스 / JAVA / Javascript] 표병합

UnionFind란?Union Find 란 집합의 원소들이 어느 그룹에 속해 있는지를 빠르게 찾고 (Find) , 합치는 (Union) 연산을 효율적으로 처리하도록 설계된 자료구조이다.주로 서로소 집합(Disjoint Set) 문제를 해결되는데 사용되는데, 서로소 집합이란 공통된 원소가 없는 두 집합을 의미한다.기본 연산Union Find 는 이전에 말했듯이, Find 와 Union 연산을 지원해야 한다.Find : 주어진 원소가 속한 대표 를 찾는 연산이다.int[] find(int x, int y){ int[] root = this.parents[x][y]; if(root[0] == x && root[1] == y) return new int[]{x,y}; int..

Algorithm 2024. 10. 15. 15:01
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바