본문 바로가기

전체 글47

[Leetcode 78] - Subsets w/ Python 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. 숫자 배열이 주어졌을때 가능한 모든 하위 집합을 리턴 중복된 집합을 배제해야된다 https://leetcode.com/problems/subsets/description/ Example 1: Input: nums = [1,2,3] Output: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]] Example 2: Input: nums = [0] Output: [.. 2024. 4. 12.
[React 공부] 1-1. 첫 컴포넌트 만들기 Your First Component – React The library for web and native user interfaces react.dev 컴포넌트란? Web에서 HTML은 태그를 통해 더 다양한 구조를 제공해준다 // 독립적인 컨텐츠를 위해 사용 My First Component // 제목 // Ordered List 사용 Components: UI Building Blocks // 리스트 element Defining a Component Using a Component 이런 마크업을 통해 CSS 스타일링과 더해져 웹에 있는 모든 내용을 볼 수 있게 된다 리액트는 이런 마크업, CSS, 자바스크립트를 합쳐서 Component를 구사하는데, 이는 재사용 가능한 UI 및 모든 정보를 새로고.. 2024. 4. 11.
[React 공부] 1. Describing the UI - 리액트의 UI 설명 React 공부를 하면서 배운 내용을 다시 정리하고 싶어서 블로그에 작성하기로 결정했다 Angular를 오래 동안 사용해서 인지 React를 금방 배웠는데, 그만큼 놓친 디테일이 있는것 같아 스스로에게 더욱 필요하다고 느꼈다 [React 공부]에서 정리한 내용은 React Dev Homepage 및 웹에 있는 정보 토대로 정리한 내용이다 Describing the UI – React The library for web and native user interfaces react.dev 1-1. 첫 컴포넌트 - Your First Component [React 공부] 1-1. Your First Component - 첫 컴포넌트 만들기 Your First Component – React The library.. 2024. 4. 11.
[Leetcode 212] - Word Search II w/ Python Given an m x n board of characters and a list of strings words, return all words on the board. Each word must be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word. 각 칸마다 글자가 들어있는 m x n 크기의 보드가 주어진다. 단어가 들어있는 words 배열 또한 주어진다 보드에 단어가 들어있으면 배열에 단어를 포함 시켜 리턴하는 문제 보드에.. 2024. 4. 11.
[Leetcode 211] - Design Add and Search Words Data Structure w/ Python Design a data structure that supports adding new words and finding if a string matches any previously added string. Implement the WordDictionary class: ● WordDictionary() Initializes the object. ● void addWord(word) Adds word to the data structure, it can be matched later. ● bool search(word) Returns true if there is any string in the data structure that matches word or false otherwise. word may.. 2024. 4. 11.
[Leetcode 208] - Implement Trie (Prefix Tree) w/ Python A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings. There are various applications of this data structure, such as autocomplete and spellchecker. Implement the Trie class: ● Trie() Initializes the trie object. ● void insert(String word) Inserts the string word into the trie. ● boolean search(String word) True i.. 2024. 4. 11.
[Leetcode 297] - Serialize and Deserialize Binary Tree w/ Python Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later in the same or another computer environment. Design an algorithm to serialize and deserialize a binary tree. There is no restriction on how your serialization/deserialization al.. 2024. 4. 11.
[Leetcode 124] - Binary Tree Maximum Path Sum w/ Python A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence at most once. Note that the path does not need to pass through the root. The path sum of a path is the sum of the node's values in the path. Given the root of a binary tree, return the maximum path sum of any non-empty path. 이진 트리가 주.. 2024. 4. 11.
[Leetcode 105] - Construct Binary Tree from Preorder and Inorder Traversal w/ Python Given two integer arrays preorder and inorder where preorder is the preorder traversal of a binary tree and inorder is the inorder traversal of the same tree, construct and return the binary tree. 전위 순회와 중위 순회가 주어진다면, 이를 통해 이진 트리를 만드는 문제 https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/description/ Example 1: Input: preorder = [3,9,20,15,7], inorder = [9,3,.. 2024. 4. 11.
반응형