본문 바로가기

Algorithm

(2139)
(C++, Rust) - LeetCode (easy) 922. Sort Array By Parity II https://leetcode.com/problems/sort-array-by-parity-ii/description/ Sort Array By Parity II - LeetCode Can you solve this real interview question? Sort Array By Parity II - Given an array of integers nums, half of the integers in nums are odd, and the other half are even. Sort the array so that whenever nums[i] is odd, i is odd, and whenever nums[i] is even leetcode.com 구현 문제였습니다. 📕 풀이방법 📔 입력 및 초..
(C++, Rust) - LeetCode (easy) 917. Reverse Only Letters https://leetcode.com/problems/reverse-only-letters/description/ Reverse Only Letters - LeetCode Can you solve this real interview question? Reverse Only Letters - Given a string s, reverse the string according to the following rules: * All the characters that are not English letters remain in the same position. * All the English letters (lowercase or leetcode.com 문자열을 다루는 문제였습니다. 📕 풀이방법 📔 풀이과정 s..
(C++, Rust) - LeetCode (easy) 914. X of a Kind in a Deck of Cards https://leetcode.com/problems/x-of-a-kind-in-a-deck-of-cards/description/ X of a Kind in a Deck of Cards - LeetCode Can you solve this real interview question? X of a Kind in a Deck of Cards - You are given an integer array deck where deck[i] represents the number written on the ith card. Partition the cards into one or more groups such that: * Each group has exactly x leetcode.com 최대공약수를 이용한 문제..
(C++, Rust) - LeetCode (easy) 908. Smallest Range I https://leetcode.com/problems/smallest-range-i/description/ Smallest Range I - LeetCode Can you solve this real interview question? Smallest Range I - You are given an integer array nums and an integer k. In one operation, you can choose any index i where 0
(C++, Rust) - LeetCode (easy) 905. Sort Array By Parity https://leetcode.com/problems/sort-array-by-parity/description/ Sort Array By Parity - LeetCode Can you solve this real interview question? Sort Array By Parity - Given an integer array nums, move all the even integers at the beginning of the array followed by all the odd integers. Return any array that satisfies this condition. Example 1: Input: leetcode.com 자료구조를 사용해보는 문제였습니다. 📕 풀이방법 📔 입력 및 초기..
(C++, Rust) - LeetCode (easy) 897. Increasing Order Search Tree https://leetcode.com/problems/increasing-order-search-tree/description/ Increasing Order Search Tree - LeetCode Can you solve this real interview question? Increasing Order Search Tree - Given the root of a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and only o leetcode.com tree 순회 문제였습니다. ..
(C++, Rust) - LeetCode (easy) 896. Monotonic Array https://leetcode.com/problems/monotonic-array/description/ Monotonic Array - LeetCode Can you solve this real interview question? Monotonic Array - An array is monotonic if it is either monotone increasing or monotone decreasing. An array nums is monotone increasing if for all i
(C++, Rust) - LeetCode (easy) 892. Surface Area of 3D Shapes https://leetcode.com/problems/surface-area-of-3d-shapes/description/ Surface Area of 3D Shapes - LeetCode Can you solve this real interview question? Surface Area of 3D Shapes - You are given an n x n grid where you have placed some 1 x 1 x 1 cubes. Each value v = grid[i][j] represents a tower of v cubes placed on top of cell (i, j). After placing these cubes, leetcode.com 공간지각능력 문제였습니다? 📕 풀이방법 ..