일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- GAN
- python
- DB
- ts
- react
- UI
- PRISMA
- Three
- ML
- SOLID
- API
- Linux
- vscode
- CSS
- mongo
- figma
- ps
- backend
- Express
- CV
- Git
- nodejs
- html
- frontend
- PyTorch
- review
- sqlite
- postgresql
- js
- C++
- Today
- Total
목록ps (27)
아카이브

문제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..

문제You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.예시Example 1.Input: matrix = [[1,2,3],[4,5,6],[7,8,9]] Output: [[7,4,1],[8,5,2],[9,6,3]] Example 2.Input: matrix = [[5,1,9,11],[2,4,8,10],[13,3,..

문제You are given the head of a singly linked-list. The list can be represented as:L0 → L1 → … → Ln - 1 → LnReorder the list to be on the following form:L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → …You may not modify the values in the list's nodes. Only nodes themselves may be changed.예시Example 1: Input: head = [1,2,3,4] Output: [1,4,2,3] Example 2: Input: head = [1,2,3,4,5] Output: [1,5,2,4,3]조건The num..
문제You are given an array of k linked-lists lists, each linked-list is sorted in ascending order.Merge all the linked-lists into one sorted linked-list and return it.예시Example 1:Input: lists = [[1,4,5],[1,3,4],[2,6]] Output: [1,1,2,3,4,4,5,6] Explanation: The linked-lists are: [ 1->4->5, 1->3->4, 2->6 ] merging them into one sorted list: 1->1->2->3->4->4->5->6Example 2:Input: lists = [] Out..