Jay

  • 홈
  • 태그
  • 방명록

너비 우선 탐색 2

프로그래머스 - 타겟 넘버

// DFS로 구현 def solution(numbers, target): sup = [0] for i in numbers: sub = [] for j in sup: sub.append(j+i) sub.append(j-i) sup = sub return sup.count(target) 참고 : https://train-validation-test.tistory.com/entry/Programmers-level-2-%ED%83%80%EA%B2%9F-%EB%84%98%EB%B2%84-python [ Programmers ] level 2 - 타겟 넘버 ( python ) 코딩테스트 풀이 프로그래머스 level 2 문제 타겟 넘버 - 깊이/너비 우선 탐색(DFS/BFS) 문제 설명 n개의 음이 아닌 정수가 있..

python/프로그래머스 2022.03.29

프로그래머스 네트워크

DFS문제는 BFS로도 가능하니 둘다 풀어보자. // DFS로 구현 1 def solution(n, computers): answer = 0 visited = [False for i in range(n)] for com in range(n): if visited[com] == False: DFS(n, computers, com, visited) answer += 1 #DFS로 컴퓨터들을 최대한으로 방문하고 빠져나오면 하나의 네트워크. return answer def DFS(n, computers, com, visited): visited[com] = True for connect in range(n): if connect != com and computers[com][connect] == 1: #연결되어..

python/프로그래머스 2022.03.29
이전
1
다음
더보기
프로필사진

Jay

  • 분류 전체보기 (563)
    • python (23)
      • baekjoon (14)
      • 동빈나 (2)
      • 프로그래머스 (6)
    • project(OpenCV) (9)
    • 빅데이터 분석기사_필기 (1)
      • 1과목_빅데이터 분석기획 (0)
      • 2과목_빅데이터 탐색 (0)
      • 3과목_빅데이터 모델링 (1)
      • 4과목_빅데이터 결과해석 (0)
    • 정보처리기사_필기 (14)
      • 소프트웨어 설계_문제풀이 (0)
      • 소프트웨어 개발_문제풀이 (11)
      • 데이터베이스 구축_문제풀이 (1)
      • 프로그래밍 언어 활용_문제풀이 (1)
      • 정보시스템 구축관리_문제풀이 (1)
    • project2(menu_recommendatio.. (1)
    • WEB (20)
      • HTML (9)
      • CSS (11)
    • Git (6)
    • Linux (8)
    • SQL(MySQL) (16)
    • Typescript (1)
      • TypeScript(ZeroCho) (7)
      • TypeScript(Captain) (2)
    • JavaScript (94)
      • DreamCoding (34)
      • 함수형 프로그래밍과 JavaScript ES6+ (32)
      • JS_Algorithm (28)
    • React (89)
      • HabitTracker (21)
      • youtube_clone_coding (13)
      • velopert_react (15)
      • BusinessCardMakerProject (3)
      • ReactBasic(ZeroCho) (10)
      • NodeBird(ZeroCho) (22)
      • john_ahn (2)
      • ShoppingMallProject (3)
    • Node.js (16)
      • NodeBird(ZeroCho) (7)
      • NodeJS-book (9)
    • Golang (10)
    • Docker (0)
    • MadApp (8)
    • HTTP (22)
    • Spring (177)
      • SpringCore (10)
      • SpringMVC (45)
      • JPA (20)
      • SpringBoot (28)
      • SpringBoot2 - API (1)
      • SpringDataJPA (23)
      • QueryDSL (21)
      • SpringDB (28)
      • SpringSecurity (1)
    • AWS (0)
    • JAVA (1)
    • music (0)
    • Cyberlogitec (0)
      • Neo4j (0)
      • RDB (0)
      • EclipseProject (0)
      • MyBatis (0)
      • Oracle vs Postgresql - Pyth.. (0)
      • BigQuery (0)
      • GitLab (0)
      • Looker Studio (0)
    • Inflearn (5)
    • 항해 플러스 (12)

Tag

thymeleaf, transaction, springboot, querydsl, MVC, ec2, AWS, SpringDB, servlet, http, Post, API, 항해플러스, jdbc, Spring, JPA, javascript, SpringMVC, ORM, SpringDataJpa,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바