jyp-on
close
프로필 배경
프로필 로고

jyp-on

  • 분류 전체보기 (57)
    • notice-crawler (15)
    • MySQL (0)
    • 오픈소스 (1)
    • Back-End (15)
      • Spring-Boot (11)
      • Node.js (2)
      • ETC (1)
    • DevOps (5)
    • Language (1)
      • Kotlin (0)
      • Java (0)
      • JavaScript (1)
    • Algorithm (10)
    • CS (3)
      • 디자인 패턴 (3)
    • 기타 (3)
  • 홈
  • GitHub
  • 방명록
  • 관리
  • 글쓰기

[프로그래머스] [python] JadenCase 문자열 만들기

처음에 단순히 공백으로 split하였더니 연속공백에서 걸려서 이런식으로 작성하였다. def solution(string): answer = '' start = True # 처음으로 나왔을때 for s in string: if s != ' ' and start: answer += s.upper() start = False elif s != ' ' and not start: # 공백이 아니고 처음 나온 숫자가 아닐때 answer += s.lower() elif s == ' ': answer += ' ' start = True return answer

  • format_list_bulleted Algorithm
  • · 2023. 1. 31.
  • textsms

[프로그래머스] BFS / 게임 맵 최단거리

queue 를 이용한 BFS 문제이다. 자세한 설명은 주석을 통해.. from collections import deque def solution(maps): row = len(maps) col = len(maps[0]) dx = [-1, 1, 0, 0] # col 증가는 오른쪽으로 증가 dy = [0, 0, -1, 1] # row 증가는 아래쪽으로 증가 graph = [[-1 for _ in range(col)] for _ in range(row)] # 이동 칸 수를 기록하기 위한 그래프 q = deque() q.append([0,0]) # 시작위치 graph[0][0] = 1 # 시작점은 그자체로 1칸 이동한 것으로 침. while q: y, x = q.popleft() # 행, 열로 탐색할 것이기 ..

  • format_list_bulleted Algorithm
  • · 2023. 1. 21.
  • textsms

[프로그래머스] 개인정보 수집 유효기간 : 2023 KAKAO BLIND RECRUITMENT

개인정보 파기 기간이 지난 개인정보 고유번호를 출력하는 문제이다. 다음 코드와 같이 현재 날짜, 개인정보 유효기간 날짜등을 모두 일수로 변환하여 비교 후 출력해주므로써 해결. def solution(today, terms, privacies): answer = [] today = list(map(int, today.split('.'))) today_year = int(today[0]) today_month = int(today[1]) today_day = int(today[2]) today_sum = 0 today_sum += today_year * 28 * 12 today_sum += today_month * 28 today_sum += today_day terms_dic = {} for term in..

  • format_list_bulleted Algorithm
  • · 2023. 1. 20.
  • textsms
  • navigate_before
  • 1
  • navigate_next
공지사항
전체 카테고리
  • 분류 전체보기 (57)
    • notice-crawler (15)
    • MySQL (0)
    • 오픈소스 (1)
    • Back-End (15)
      • Spring-Boot (11)
      • Node.js (2)
      • ETC (1)
    • DevOps (5)
    • Language (1)
      • Kotlin (0)
      • Java (0)
      • JavaScript (1)
    • Algorithm (10)
    • CS (3)
      • 디자인 패턴 (3)
    • 기타 (3)
최근 글
인기 글
최근 댓글
태그
  • #Spring Boot
  • #디자인 패턴
  • #오블완
  • #RestAPI
  • #Programmers
  • #티스토리챌린지
  • #백준
  • #DFS
  • #BFS
  • #파이썬
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바