| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 눈알빠지겠네
- 코딩테스트
- 건담헤드
- 바질토마토뭐시기
- 발더스모드
- 프라모델
- 지쿠악스
- LeetCode
- 미앤아이
- 밥무하마드
- 롱라이플
- 코테
- 메탈퍼즐
- 맛집
- 건담
- DIY
- 제프딕슨
- 노노그램
- 지리데칼
- 취미
- 게임
- 포켓몬
- javascript
- 발더스게이트
- 블라인드박스
- 가챠
- 우리시대의역설
- 30mf
- 유루건
- 누룽지소금빵
- Today
- Total
목록coding test (87)
.Zzumbong
난이도 [ 😊 ] Easy 문제 설명 On a 2D plane, there are n points with integer coordinates points[i] = [xi, yi]. Return the minimum time in seconds to visit all the points in the order given by points. You can move according to these rules: In 1 second, you can either: move vertically by one unit, move horizontally by one unit, or move diagonally sqrt(2) units (in other words, move one unit vertically the..
난이도 [ 🤔 ] Medium 문제 설명 Given the root of a binary tree, split the binary tree into two subtrees by removing one edge such that the product of the sums of the subtrees is maximized. Return the maximum product of the sums of the two subtrees. Since the answer may be too large, return it modulo 109 + 7. Note that you need to maximize the answer before taking the mod and not after taking it. 입출력 예E..
난이도 [ 🤔 ] Medium 문제 설명 Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level x such that the sum of all the values of nodes at level x is maximal. 이진 트리의 루트(root)가 주어집니다. 루트의 레벨은 1이고, 그 자식들의 레벨은 2, 그다음은 3으로 이어집니다.각 레벨에 있는 모든 노드 값의 합을 구했을 때, 그 합이 최대가 되는 가장 작은 레벨 x를 반환하세요.포인트 1: 합이 최대인 레벨을 찾아야 함.포인트 2: 만약 합이 같은 레벨이 여러 개라면..
난이도 [ 🤔 ] Medium 문제 설명 You are given an n x n integer matrix. You can do the following operation any number of times: Choose any two adjacent elements of matrix and multiply each of them by -1. Two elements are considered adjacent if and only if they share a border. Your goal is to maximize the summation of the matrix's elements. Return the maximum sum of the matrix's elements using the operati..
난이도 [ 😊 ] Easy 문제 설명 You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading 0's. Increment the large integer by one and return the resulting array of digits. 입출력 예Example 1:Input: digits = [1..
난이도 [ 👿 ] Hard 문제 설명 There is a 1-based binary matrix where 0 represents land and 1 represents water. You are given integers row and col representing the number of rows and columns in the matrix, respectively. Initially on day 0, the entire matrix is land. However, each day a new cell becomes flooded with water. You are given a 1-based 2D array cells, where cells[i] = [ri, ci] represents that o..
난이도 [ 😊 ] Easy 문제 설명 You are given an array apple of size n and an array capacity of size m. There are n packs where the ith pack contains apple[i] apples. There are m boxes as well, and the ith box has a capacity of capacity[i] apples. Return the minimum number of boxes you need to select to redistribute these n packs of apples into boxes. Note that, apples from the same pack can be distribute..
난이도 [ 🤔 ] Medium 문제 설명 You are stacking blocks to form a pyramid. Each block has a color, which is represented by a single letter. Each row of blocks contains one less block than the row beneath it and is centered on top. To make the pyramid aesthetically pleasing, there are only specific triangular patterns that are allowed. A triangular pattern consists of a single block stacked on top of t..
난이도 [ 😊 ] Easy문제 설명Given a m x n matrix grid which is sorted in non-increasing order both row-wise and column-wise,return the number of negative numbers in grid.여기서 non-increasing order는 내림차순(값이 같거나 작아짐)을 의미함.그리고 이게 row-wise(가로)와 column-wise 모두에 적용된다는 것이 핵심.입출력 예Example 1:Input: grid = [[4,3,2,-1],[3,2,1,-1],[1,1,-1,-2],[-1,-1,-2,-3]]Output: 8Explanation: There are 8 negatives number in the mat..
난이도 [ 😊 ] Easy 문제 설명 You are given two arrays of integers, fruits and baskets, each of length n, where fruits[i] represents the quantity of the ith type of fruit, and baskets[j] represents the capacity of the jth basket. From left to right, place the fruits according to these rules: Each fruit type must be placed in the leftmost available basket with - a capacity greater than or equal..
난이도 [ 😊 ] Easy 문제 설명 Given an array of string words, return all strings in words that is a substring of another word. You can return the answer in any order. A substring is a contiguous sequence of characters within a string 입출력 예 Example 1:Input: words = ["mass","as","hero","superhero"] Output: ["as","hero"] Explanation: "as" is substring of "mass" and "hero" is substring of "superhero". ["he..
난이도 [ 🤔 ] Medium 문제 설명 Given an integer n, break it into the sum of k positive integers, where k >= 2, and maximize the product of those integers. Return the maximum product you can get. 입출력 예 Example 1: Input: n = 2 Output: 1 Explanation: 2 = 1 + 1, 1 × 1 = 1. Example 2: Input: n = 10 Output: 36 Explanation: 10 = 3 + 3 + 4, 3 × 3 × 4 = 36. Constraints 2
난이도 [ 😊 ] Easy 문제 설명 Design a HashMap without using any built-in hash table libraries. Implement the MyHashMap class: MyHashMap() initializes the object with an empty map. void put(int key, int value) inserts a (key, value) pair into the HashMap. If the key already exists in the map, update the corresponding value. int get(int key) returns the value to which the specified key is mapped, or -1 if..
난이도 [ 🤔 ] Medium 문제 설명 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L S I I G Y I R And then read line by line: "PAHNAPLSIIGYIR" Write the code that will take a string and make this conversion given a number of rows: string convert(string s, int numRows); 입출..
난이도 [ 😊 ] Easy 문제 설명 Given an array of integers nums, return the number of good pairs. A pair (i, j) is called good if nums[i] == nums[j] and i < j. 정수 nums 배열을 받아서 good pairs 를 리턴한다. good pair 는 nums[i] === nums[j] 이다. i < j 는 해당하지 않음.. 문제가 좀 이상하긴해 입출력 예 Example 1: Input: nums = [1,2,3,1,1,3] Output: 4 Explanation: There are 4 good pairs (0,3), (0,4), (3,4), (2,5) 0-indexed. Example 2: Input: n..
난이도 [ 🤔 ] Medium 문제 설명 There are n pieces arranged in a line, and each piece is colored either by 'A' or by 'B'. You are given a string colors of length n where colors[i] is the color of the ith piece. Alice and Bob are playing a game where they take alternating turns removing pieces from the line. In this game, Alice moves first. Alice is only allowed to remove a piece colored 'A' if both its n..
난이도 [ 😊 ] Easy 문제 설명 Given a string s, reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. 문자열 s가 주어지면 공백과 단어 순서를 그대로 유지하면서 단어의 문자 순서를 반대로 바꾼다. 입출력 예 Example 1: Input: s = "Let's take LeetCode contest" Output: "s'teL ekat edoCteeL tsetnoc" Example 2: Input: s = "God Ding" Output: "doG gniD" Constraints 1
난이도 [ 😊 ] Easy 문제 설명 Given a string s, return the length of the longest substring between two equal characters, excluding the two characters. If there is no such substring return -1. A substring is a contiguous sequence of characters within a string. 문자열 s가 주어진다. 두 문자를 제외한 두 개의 문자 사이의 가장 긴 부분 문자열의 길이를 반환한다. 문자열이 없으면 -1을 반환한다. 입출력 예 Example 1: Input: s = "aa" Output: 0 Explanation: The optimal su..
난이도 [ 😊 ] Easy 문제 설명 An array is monotonic if it is either monotone increasing or monotone decreasing. An array nums is monotone increasing if for all i
난이도 [ 🤔 ] Medium 문제 설명 You are given an encoded string s. To decode the string to a tape, the encoded string is read one character at a time and the following steps are taken: If the character read is a letter, that letter is written onto the tape. If the character read is a digit d, the entire current tape is repeatedly written d - 1 more times in total. Given an integer k, return the kth lette..
