분류 전체보기

    [캐시]캐싱 전략에 대해서 (feat. Redis)

    안녕하세요, 오늘은 Redis에서 캐싱을 위한 여러가지 전략들에 대해서 알아보려고 합니다. 이전까지는 캐싱에 대해서 단순하게 잘 바뀌지 않는 데이터를 캐싱하면 좋을거야, DB 엑세스보다 메모리 엑세스가 빠르니 캐싱이 좋을거야와 같은 1차원적인 생각만을 가지고 있었는데요. Redis에서 캐시를 읽고 쓰기 위한 여러가지 전략들에 대해 알게되어, 공부하는 차원에서 캐싱 전략에 대한 내용들을 정리해보려고 합니다. Redis 캐시 읽기 전략 Look Aside (Cache Aside) 전략 기본적으로 캐시에 데이터가 있는지 확인합니다. 데이터가 없다면 DB에서 데이터를 찾아봅니다. DB에서 가져온 데이터를 캐시에 저장합니다. 데이터를 사용자에게 전달합니다. 이처럼 Look Aside 전략은 데이터가 캐시에 있는지..

    [Database] PostgreSQL 타입 정리

    PostgreSQL에서 자주 사용되는 타입들을 정리합니다. 자세한 내용은 아래의 Document를 참고하시면 됩니다. https://www.postgresql.org/docs/current/datatype.html Chapter 8. Data Types Chapter 8. Data Types Table of Contents 8.1. Numeric Types 8.1.1. Integer Types 8.1.2. Arbitrary Precision Numbers 8.1.3. Floating-Point Types 8.1.4. Serial … www.postgresql.org Numeric Types smallint, 작은 범위의 정수 integer, 일반 범위의 정수 bigint, 큰 범위의 정수 decimal..

    [LeetCode]Construct Binary Tree from Preorder and Inorder Traversal

    https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ Construct Binary Tree from Preorder and Inorder Traversal - LeetCode Can you solve this real interview question? Construct Binary Tree from Preorder and Inorder Traversal - Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder trave..

    [LeetCode]Binary Tree Level Order Traversal

    https://leetcode.com/problems/binary-tree-level-order-traversal/description/ Binary Tree Level Order Traversal - LeetCode Can you solve this real interview question? Binary Tree Level Order Traversal - Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level). Example 1: [https://assets.leetcode.com/u leetcode.com 문제 분석 주어진..

    [LeetCode]Validate Binary Search Tree

    https://leetcode.com/problems/validate-binary-search-tree/description/ Validate Binary Search Tree - LeetCode Can you solve this real interview question? Validate Binary Search Tree - Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: * The left subtree of a node contains only nodes with keys le leetcode.com 문제 분석 주어진 Tree가 유효..

    [LeetCode]Word Search

    https://leetcode.com/problems/word-search/ Word Search - LeetCode Can you solve this real interview question? Word Search - Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are h leetcode.com 문제 분석 주어진 board를 수평, 수직으로 이동하면서 탐색할 때 word를 만들 수 있는지를 구하는 문제입니..

    [LeetCode]Subsets

    https://leetcode.com/problems/subsets/ Subsets - LeetCode Can you solve this real interview question? Subsets - Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example 1: Input: n leetcode.com 문제 분석 주어진 숫자배열을 가지고 가능한 모든 부분집합을 구하는 문제입니다. 순서는 상관 없습니다. 처음 시도한 답안 class ..

    [LeetCode]Sort Colors

    https://leetcode.com/problems/sort-colors/ Sort Colors - LeetCode Can you solve this real interview question? Sort Colors - Given an array nums with n objects colored red, white, or blue, sort them in-place [https://en.wikipedia.org/wiki/In-place_algorithm] so that objects of the same color are adjacent, with the colors leetcode.com 문제 분석 주어진 nums 배열에 담긴 color들을 인접하도록 정렬하는 문제입니다. 처음 시도한 답안 class..

    [LeetCode]Search a 2D Matrix

    https://leetcode.com/problems/search-a-2d-matrix/description/ Search a 2D Matrix - LeetCode Can you solve this real interview question? Search a 2D Matrix - You are given an m x n integer matrix matrix with the following two properties: * Each row is sorted in non-decreasing order. * The first integer of each row is greater than the last integer leetcode.com 문제 분석 주어진 2D Matrix에 target 값이 존재하는지를..

    [LeetCode]Set Matrix Zeroes

    https://leetcode.com/problems/set-matrix-zeroes/description/ Set Matrix Zeroes - LeetCode Can you solve this real interview question? Set Matrix Zeroes - Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's. You must do it in place [https://en.wikipedia.org/wiki/In-place_algorithm]. Example 1: [https leetcode.com 문제 분석 m*n matrix에서 0을 만날 때 해당 위치가 들어간 row..