전체 글

전체 글

    9/1 (금) 트리 문제 기초 접근법을 3가지로 정리하다 TIL

    공부한 것LeetCode #226. Invert Binary TreeLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/invert-binary-tree/description/트리를 뒤집어 반환하는 문제이다. 각 노드별로 좌우 자식을 바꿔주면 되고 이는 결국 노드를 전부 방문해야 한다는 얘기가 된다. 기초적인 전위 순회(Preorder ..

    8/31 (목) 트리 순회 3형제는 깊이 우선 탐색(DFS)의 일종이다 TIL

    공부한 것LeetCode #572. Subtree of Another TreeLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/subtree-of-another-tree/description/처음 생각해낸 방법이 대부분의 사람들이 채택한 로직임을 알게 되어서 뿌듯했다. DFS와 BFS에 대하여: 트리나 그래프와 같은 자료구조에서 노드를..

    8/30 (수) 깊이 우선 탐색(DFS) 예제 코드TIL

    공부한 것LeetCode #110. Balanced Binary TreeLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/balanced-binary-tree/description/이상한 테스트 케이스 하나가 있는 것으로 결론 내리고 마무리 지었다. 배운 것깊이 우선 탐색(DFS)에 해당하는 예제와 생각 과정은 다음과 같다: 로직: 1..

    8/29 (화) Tree의 깊이 탐색하기 TIL

    공부한 것LeetCode #110. Balanced Binary TreeLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/balanced-binary-tree/description/아직 타파중. 재귀 호출을 이용한 해답을 공부하고 추가하였다. 배운 것Tree 자료구조에서 한 노드를 타겟으로 그 ‘깊이’를 구하고자 할 때 공식처럼 사용할..

    8/28 (월) 너비 우선 탐색(BFS)과 새로운 메소드 TIL

    공부한 것LeetCode #100. Same TreeLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/same-tree/Tree 카테고리로 넘어왔다. 기본적으로 재귀 호출이 필요한 구조인 듯 하다. LeetCode #110. Balanced Binary TreeLeetCode - The World's Leading Online Prog..

    8/25 (금) TypeScript 테스트 코드, 성공적 TIL

    공부한 것LeetCode #142. Linked List Cycle IILeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/linked-list-cycle-ii/description/?envType=list&envId=rus4c4ciFloyd’s Tortoise & Hare Algorithm을 이용한 간단한 문제였다. 우연히 접해서 알차..

    8/24 (목) 퀴즈 풀이 디렉토리에 TypeScript를 적용하다 TIL, TIT

    공부한 것LeetCode #141. Linked List CycleLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/linked-list-cycle/description/?envType=list&envId=rus4c4ci⇒ 주어진 링크드 리스트에 순환하는 지점이 있는지를 검사하는 문제다. 바로 얼마전에 배운 Floyd’s Tortois..

    8/23 (수) Binary search 와 Bit mask 해법 TIL

    8/23 (수) Binary search 와 Bit mask 해법 TIL

    공부한 것LeetCode #287. Find the Duplicate Number LeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/find-the-duplicate-number/description/?envType=list&envId=rus4c4ci내가 푼 방식과 다른 해답을 8개 더 추가하였다. 구상 중문제풀이 코드 제출 후 실행 ..

    8/22 (화) LeetCode API 조사중 TIL, TIT

    공부한 것LeetCode #287. Find the Duplicate Number LeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/find-the-duplicate-number/description/?envType=list&envId=rus4c4ci어제 배운 Floyd’s Tortoise & Hare Algorithm을 응용하는 문제..

    8/21 (월) 풀이 제출 후 소요 시간 시각화하기 TIL, TIT

    공부한 것LeetCode #234. Palindrome Linked List(팰린드롬 링크드 리스트)를 이어서 풀었다. LeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/palindrome-linked-list/description/?envType=list&envId=rus4c4ci지난 주 두 가지 풀이법은 공간을 O(N)만큼 추가로 ..

    8/19 (토) 퀴즈풀이도 타입스크립트로 써볼까 TIL

    공부한 것LeetCode #234. Palindrome Linked List(팰린드롬 링크드 리스트)를 풀었다. LeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/palindrome-linked-list/description/?envType=list&envId=rus4c4ci두 가지 방법으로 풀긴 했는데 공간복잡도를 O(1)로 낮추라는..

    8/18 (금) 양방향 링크드 리스트와 LRU 캐시 디자인 TIL

    공부한 것LeetCode #146. LRU Cache (캐시 디자인)를 풀었다. LeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/lru-cache/submissions/1024552141/?envType=list&envId=rus4c4ci알게 된 것필요한 캐시 자료구조를 만드는 문제를 푸는데 Doubly linked list라는 걸 ..

    8/17 (목) 오버로딩 안되는 JavaScript의 메소드와 속성 TIL

    공부한 것LeetCode #61. Rotate List (링크드 리스트 회전시키기)를 풀었다.Abdul Bari의 유튜브 강의 中 Dividing function로 표현된 재귀함수 점화식의 시간복잡도를 구하는 master’s theorem을 짧게 공부하였다. (Master’s theorem이란 한 마디로 마법식 같은 것이었다. 미적분의 기본 정리, 페르마의 정리처럼 해법의 패턴을 정리해놓은 정리이다.) 알게 된 것JavaScript에서 클래스에 같은 이름의 속성과 메소드를 동시에 만들 수 없다는 것을 알았다. 예를 들면 다음과 같은 클래스에서: /** * 주어진 singly-linked list의 정의는 다음과 같다: */ class ListNode { constructor(val, next) { thi..

    8/16 (수) 링크드 리스트와 재귀함수 점화식 TIL

    8/16 (수) 링크드 리스트와 재귀함수 점화식 TIL

    오늘 공부한 것그동안 LeetCode에서 문제를 풀었다. 아래 로드맵에서 보는 바와 같이 Array와 Hash map, Two pointers, Stack, Binary search, Sliding window의 주제를 골라 풀었고, 지금은 Linked list 문제들을 푸는 중이다. 푼 문제는 LeetCode에 제출되어있고 테스트 코드와 세트로 로컬 js 파일로 저장되어 있으며 최근 들어서는 깃헙에도 세트로 푸시하고 있다. LeetCode의 discussion 섹션에서 추천받은 재귀함수 유튜브 강의를 듣고 있다. Recurrence Relation(점화식)의 형태에 따른 알고리즘의 시간복잡도를 계산하는 방법을 가르쳐준다. Uploaded by N2T

    [SQL] CASE 문법과 IN 서브쿼리 문법 + 데이터베이스 보호 방법에 대한 개괄(SQLite 기반)

    /* 칸 아카데미의 SQL 강의를 학습하고 정리한 내용입니다. Intro to SQL: Querying and managing data | Khan AcademyLearn how to use SQL to store, query, and manipulate data. SQL is a special-purpose programming language designed for managing data in a relational database, and is used by a huge number of apps and organizations.https://www.khanacademy.org/computing/computer-programming/sql*/ 오늘의 개발 용어: PoC (Proof of Conce..

    [SQL] Join 종류 간단 정리 + 쿼리 플래닝과 최적화에 대한 개괄(SQLite 기반)

    [SQL] Join 종류 간단 정리 + 쿼리 플래닝과 최적화에 대한 개괄(SQLite 기반)

    /* 칸 아카데미의 SQL 강의를 학습하고 정리한 내용입니다. Intro to SQL: Querying and managing data | Khan AcademyLearn how to use SQL to store, query, and manipulate data. SQL is a special-purpose programming language designed for managing data in a relational database, and is used by a huge number of apps and organizations.https://www.khanacademy.org/computing/computer-programming/sql*/ 여러 Join들Inner Join: 양 테이블에 on ..

    5/24 수 [LeetCode #36] 유효한 스도쿠 TIL

    5/24 수 [LeetCode #36] 유효한 스도쿠 TIL

    [LeetCode] 36. Valid SudokuValid Sudoku - LeetCodeCan you solve this real interview question? Valid Sudoku - Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: 1. Each row must contain the digits 1-9 without repetition. 2. Each column must contain the digits 1-9 without repetition. 3. Each of the nine 3 x 3 sub-boxes of the gr..

    5/22 월 [LeetCode #347] K개의 최빈값 TIL

    5/22 월 [LeetCode #347] K개의 최빈값 TIL

    [LeetCode] 347. Top K Frequent ElementsTop K Frequent Elements - LeetCodeCan you solve this real interview question? Top K Frequent Elements - Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input: nums = [1], k = 1 Output: [1] Constraints: * 1

    5/19 금 [LeetCode #1] 투썸 TIL

    5/19 금 [LeetCode #1] 투썸 TIL

    [LeetCode] 1. Two SumTwo Sum - LeetCodeCan you solve this real interview question? Two Sum - Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example 1: Input: nums = [2,7,11,15..

    5/18 목 [LeetCode #242] 유효한 아나그램 TIL

    5/18 목 [LeetCode #242] 유효한 아나그램 TIL

    [LeetCode] 242. Valid AnagramValid Anagram - LeetCodeCan you solve this real interview question? Valid Anagram - Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Example 1: Input: s = "anagram", t = "nagaram" Ou..