일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- frontend
- vscode
- ML
- js
- Express
- html
- API
- react
- ps
- Git
- PRISMA
- review
- CS
- UI
- CV
- ts
- SOLID
- python
- Linux
- mongo
- CSS
- backend
- postgresql
- PyTorch
- figma
- GAN
- nodejs
- DB
- C++
- Three
- Today
- Total
목록CS (38)
아카이브
문제Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.Implement the MinStack class:MinStack() initializes the stack object.void push(int val) pushes the element val onto the stack.void pop() removes the element on the top of the stack.int top() gets the top element of the stack.int getMin() retrieves the minimum element in the stack.You must implement..
문제Design a data structure that follows the constraints of a Least Recently Used (LRU) cache.Implement the LRUCache class:LRUCache(int capacity) Initialize the LRU cache with positive size capacity.int get(int key) Return the value of the key if the key exists, otherwise return -1.void put(int key, int value) Update the value of the key if the key exists. Otherwise, add the key-value pair to the ..
정규표현식은 특정한 규칙을 가진 문자열의 집합을 표현하는 데 사용하는 형식 언어입니다. 가령, 'E'로 시작하는 단어를 찾거나, 숫자를 제외한 모든 문자열을 찾아내는 등의 경우에 사용됩니다. 아래는 정규표현식을 작성하는 문법에 대해 정리한 표입니다.POSIX 표준기호뜻예시표현가능한 문자열.임의의 한 문자a.baab, abb, acb, ...*임의의 문자열a*bab, aab, aaab, abcb, ...^처음^abc.abca, abcb, abcc, ...$끝.abc$aabc, babc, cabc, ...( )하위식a(bb|cc)dabbd, accd{ }좌측의 문자가 반복a{3}baaab{m,}좌측의 문자가 m회 이상 반복a{3,}baaab, aaaab, ...{m, n}좌측의 문자가 m회 이상, n회 이하..
문제The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two middle values.For example, for arr = [2,3,4], the median is 3.For example, for arr = [2,3], the median is (2 + 3) / 2 = 2.5.Implement the MedianFinder class:MedianFinder() initializes the MedianFinder object.void addNum(int num) adds the in..

문제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.예시Example 1:Input: board = [["o","a","a","n"],["e","t","a","e"],["i","h","k","r"],["i","f","l","v"]]..
문제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 contain..

문제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.예시Example 1:Input: preorder = [3,9,20,15,7], inorder = [9,3,15,20,7] Output: [3,9,20,null,null,15,7]Example 2:Input: preorder = [-1], inorder = [-1] Output: [-1]조건1 inorder.length == preorder.length -..
문제Given a string s, return the longest palindromic substring in s.예시Example 1:Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid answer.Example 2:Input: s = "cbbd" Output: "bb"조건1 s consist of only digits and English letters.답문자열을 순회하면서 각 인덱스마다 양옆으로 하위 문자열을 확장하면서 팰린드롬인지 판단합니다. 문자열 길이가 짝수일 때와 홀수일 때 두 가지 모양의 팰린드롬이 존재하므로, 각 인덱스마다 인덱스 번호 [i]를 중심으로 하는 경우와 [i, i+1]를 중심으로 하는 경우 두가지의 팰린..