일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |
- review
- DB
- Three
- ML
- C++
- postgresql
- js
- CV
- Linux
- CSS
- CS
- mongo
- html
- UI
- python
- ts
- backend
- SOLID
- frontend
- figma
- Git
- API
- PyTorch
- react
- PRISMA
- vscode
- Express
- GAN
- ps
- nodejs
- Today
- Total
목록CS/PS (30)
아카이브
문제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]를 중심으로 하는 경우 두가지의 팰린..
문제A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers.Given a string s, return true if it is a palindrome, or false otherwise.예시Example 1:Input: s = "A man, a plan, a canal: Panama" Output: true Explanation: "amanaplanaca..
문제Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "".The testcases will be generated such that the answer is unique.예시Example 1:Input: s = "ADOBECODEBANC", t = "ABC" Output: "BANC" Explanation: The minimum wind..

문제You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at most k times.Return the length of the longest substring containing the same letter you can get after performing the above operations.예시Example 1:Input: s = "ABAB", k = 2 Output: 4 Explanation: Replace the two 'A's with t..