본문 바로가기

분류 전체보기

(163)
[ 토스 기술 블로그 ] SLASH 21 - Day 1 토스의 서버 인프라 모니터링 토스의 서버 인프라 모니터링서버 인프라를 효과적으로 트러블 슈팅할 수 있도록 노력한 경험과 모니터링 인프라를 운영한 경험을 공유합니다.toss.im 모니터링 시스템의 변화토스는 모니터링 시스템에서 2019년 -> 2021년 사이 인프라 변화가 있었음 DC/OS , Vamp -> Istio , kubernetes ( k8 ) 이렇게 모니터링 시스템의 변화가 생김 쿠버네티스를 주로 사용하다보니 프로메테우스가 메인 모니터링 시스템이 되었음 Service Mesh는 분산 API Gateway로 서버사이드 로드 밸런싱이 아니라 클라이언트 사이드 로드 밸런싱임 -> 하나의 Api Gateway에 장애가 발생해도 영향이 적었음 서비스 메쉬?마이크로서비스 아키텍처에서 서비스 간의 통신을 관리하고 제어하기 위한 인프라 ..
99클럽 코테 스터디 39일차 TIL, 프로그래머스 / 로또의 최고 순위와 최저 순위 🔑 오늘의 학습 키워드 : 그리디🔗 문제링크 https://school.programmers.co.kr/learn/courses/30/lessons/77484 def solution(lottos, win_nums): cnt,zero = 0,0 for lotto in lottos: if lotto in set(win_nums) : cnt += 1 elif lotto == 0 : zero += 1 return [6 if -cnt-zero == 0 else 7 - cnt-zero,6 if cnt == 0 else 7-cnt] 🗒️ 공부한 내용 본인의 언어로 정리하기🤔 문제를 보고 든 생각쉽다⏰ 예상 시간 복잡도 O(N)제한 사항lottos는 길이 6인 정수 배열..
99클럽 코테 스터디 38일차 TIL, 프로그래머스 / 혼자 놀기의 달인 🔑 오늘의 학습 키워드🔗 문제링크 https://school.programmers.co.kr/learn/courses/30/lessons/131130 def solution(cards): opened = [False] * len(cards) box_group = [] def open_box(cards, idx): opened[idx] = True tmp = [idx] while True: next_open = cards[idx] - 1 if opened[next_open]: break opened[next_open] = True ..
99클럽 코테 스터디 37일차 TIL, 백준 / 2048 (Easy) / 12100 🔑 오늘의 학습 키워드 : 구현, dfs🔗 문제링크 https://www.acmicpc.net/problem/12100 import sysfrom copy import deepcopyinput = sys.stdin.readlineN = int(input())board = []for _ in range (N): board.append(list(map(int,input().split()))) def up(board): for j in range(N): pointer = 0 for i in range(1, N): if board[i][j]: tmp = board[i][j] boar..
99클럽 코테 스터디 36일차 TIL, 백준 / 도미노 / 1552 🔑 오늘의 학습 키워드 dfs🔗 문제링크 https://www.acmicpc.net/problem/1552 import itertools# 알파벳을 숫자로 변환하는 함수def alphabet_to_minus_num(c): if c.isdigit(): return int(c) else: return -1 * (ord(c) - ord('A') + 1)# 점수를 계산하는 함수def calculate_domino_cross(cycles, domino): score = 1 for cycle in cycles: cycle_score = 1 for (i, j) in cycle: cycle_score *= domino[i][..
99클럽 코테 스터디 35일차 TIL, 프로그래머스 / 퍼즐 조각 채우기 🔑 오늘의 학습 키워드 BFS, 구현🔗 문제링크 https://school.programmers.co.kr/learn/courses/30/lessons/84021 from collections import dequedef solution(game_board, table): answer = 0 n = len(game_board) directions = [(1, 0), (0, 1), (-1, 0), (0, -1)] def in_range(x, y): return 0  🗒️ 공부한 내용 본인의 언어로 정리하기🤔 문제를 보고 든 생각문제가 요구하는 사항이 많아서 함수단위로 우선 작성을 한다음 코드 세부 구현을 해야겠다고 생각했다.1. BFS로 구멍이랑 블록을 구분하는 함..
99클럽 코테 스터디 34일차 TIL, 프로그래머스 / 여행경로 🔑 오늘의 학습 키워드 dfs, 백트래킹🔗 문제링크 https://school.programmers.co.kr/learn/courses/30/lessons/43164 def solution(tickets): n = len(tickets) answer = [] def dfs(): if len(stack) == n+1 : a = [stack[i] for i in range(n+1)] answer.append(a) for i in range(n): if not visited[i] and stack[-1] == tickets[i][0] : visited[i] = 1 ..
99클럽 코테 스터디 33일차 TIL, 프로그래머스 / 단어 변환 🔑 오늘의 학습 키워드 bfs🔗 문제링크 https://school.programmers.co.kr/learn/courses/30/lessons/43163 def solution(begin, target, words): # 못찾는 경우 if target not in set(words): return 0 answer = 0 stack = [(begin,0)] visited = set() visited.add(begin) while stack: start,cnt = stack.pop() for word in words: if word not in visited: wron..