Zero to Hero
article thumbnail
웹 엔지니어가 알아야 할 인프라의 기본 01
Review 2021. 5. 8. 19:07

RAID 시스템은 가능하면 하드웨어로 구현할 것 - 0 : Striping, 데이터 분산, 읽기 속도 증가, 데이터 손상 시 복구 불가 - 1 : Mirroring, 데이터 복사, 읽기 및 쓰기 속도 그대로, 데이터 손상 시 복구 가능 - 4 : RAID 1 + 데이터 손상을 복구할 수 있는 Parity용 HDD 추가, Parity HDD 병목현상으로 잘 안 씀 - 5 : RAID 4 + Parity 데이터 Striping, HDD 한 개가 손상되어도 나머지로 복구 가능 - 6 : RAID 5 + Parity 데이터를 하나 더 만들어서 Striping, HDD 두 개가 손상되어도 나머지로 복구 가능 Buffer - 처리를 효율화하고 보틀넥을 완화하기 위한 기술 - 일반적으로 다음 단계의 처리 효율을 올리..

article thumbnail
647. Palindromic Substrings
Algorithm 2021. 5. 7. 11:21

Palindromic Substrings - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Brute Force (실패) class Solution: def countSubstrings(self, s: str) -> int: def check(input_string): start, end = 0, len(input_string) - 1 while start < end: if input_string[start] != input_string[end]: retu..

article thumbnail
230. Kth Smallest Element in a BST
Algorithm 2021. 5. 7. 09:46

Kth Smallest Element in a BST - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. In-Order Traversal using Iteration class Solution: def kthSmallest(self, root: TreeNode, k: int) -> int: answers=[] def inorder(cur): global count if not cur: return inorder(cur.left) answers.append(..

739. Daily Temperatures
Algorithm 2021. 5. 6. 15:44

Daily Temperatures - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Monotone Stack from typing import * class Solution: def dailyTemperatures(self, T: List[int]) -> List[int]: index = [i for i in range(len(T))] new_list = list(map(lambda x, y: (x, y), index, T)) stack, answer =..

article thumbnail
78. Subsets
Algorithm 2021. 5. 6. 14:53

Subsets - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. 내장 함수 사용 from itertools import combinations class Solution: def subsets(self, nums: List[int]) -> List[List[int]]: answer=[] for length in range(len(nums)+1): for item in combinations(nums, length): answer.append(list(ite..

article thumbnail
1. Two Sum
Algorithm 2021. 5. 5. 21:20

Two Sum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Sliding Window class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: index_list = [i for i in range(len(nums))] new_nums = list(map(lambda x, y: (x, y), nums, index_list)) new_nums.sort() start, end..