응파카 성장일지

  • 홈
  • 태그
  • 방명록

bfs 2

섬나라 아일랜드 (BFS, DFS)

BFS import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; class Node{ int x; int y; public Node(int x, int y) { this.x = x; this.y = y; } } public class Main { static int answer = 0, n; static int[] dx = {1, 1, 1, -1, -1, -1, 0, 0}; static int[] dy = {1, 0, -1, 1, 0, -1, 1, -1}; static int[][] board; static Queue queue = new LinkedList(); public void BFS(int x, int y) { ..

[Solved]/코딩테스트 2023.03.30

토마토(BFS 활용)

import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; class Tomato{ int x, y; public Tomato(int x, int y) { this.x = x; this.y = y; } } public class Main { static int[][] box; static int[][] day; static int[] dx = {1, -1, 0, 0}; static int[] dy = {0, 0, 1, -1}; static int n, m; static Queue queue = new LinkedList(); public void BFS() { while(!queue.isEmpty()) { Tomato to..

[Solved]/코딩테스트 2023.03.29
이전
1
다음
더보기
프로필사진

응파카 성장일지

  • 분류 전체보기
    • [Diary]
    • [Java]
      • 문법, 자료구조, 알고리즘
    • [Spring]
      • Spring 정리
      • JPA 프로그래밍 - 기본편
    • [Solved]
      • BOJ
      • 코딩테스트
    • [Computer Science]
      • Data Structure
    • [Project]
      • Favor 프로젝트
    • [Finance]
      • Woori FISA

Tag

Java, 플래너, Stack, JPA 프로그래밍, Deque, JPA프로그래밍 기본편, string, coding test, priorityqueue, JPA프로그래밍 기초, 티스토리챌린지, Heap, 오블완, 김영한의 Spring, spring, BOJ, JPA, Favor 프로젝트, inheritance, 코딩테스트,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • 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.

티스토리툴바