목록언어/JAVA
Step-by-Step

https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/description/ Convert Sorted List to Binary Search Tree - LeetCode Can you solve this real interview question? Convert Sorted List to Binary Search Tree - Given the head of a singly linked list where elements are sorted in ascending order, convert it to a height-balanced binary search tree. Example 1: [https://assets.l leetco..

https://leetcode.com/problems/count-subarrays-with-fixed-bounds/description/ Count Subarrays With Fixed Bounds - LeetCode Can you solve this real interview question? Count Subarrays With Fixed Bounds - You are given an integer array nums and two integers minK and maxK. A fixed-bound subarray of nums is a subarray that satisfies the following conditions: * The minimum value in leetcode.com Hard 문..
https://leetcode.com/problems/string-compression/ String Compression - LeetCode Can you solve this real interview question? String Compression - Given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each group of consecutive repeating characters in chars: * If the group's leng leetcode.com 알파벳1 - 연속된 수 (1제외) - 알파벳2 - 연속된 수 - ... 로 나타내는 작..
https://leetcode.com/problems/edit-distance/description/ Edit Distance - LeetCode Can you solve this real interview question? Edit Distance - Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: * Insert a character * D leetcode.com DP 사용해서 문제인데, 사실 너무 감이 오지 않아서 여러 검색을 통해 푸는 방법을..
https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/ Capacity To Ship Packages Within D Days - LeetCode Capacity To Ship Packages Within D Days - A conveyor belt has packages that must be shipped from one port to another within days days. The ith package on the conveyor belt has a weight of weights[i]. Each day, we load the ship with packages on the conveyor leetcode.com 풀긴 풀었는..
https://leetcode.com/problems/single-element-in-a-sorted-array/description/ Single Element in a Sorted Array - LeetCode Can you solve this real interview question? Single Element in a Sorted Array - You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. Return the single element leetcode.com HashMap을 ..
https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ Binary Tree Zigzag Level Order Traversal - LeetCode Binary Tree Zigzag Level Order Traversal - Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between). Example 1: [https://assets leetcode.com DFS를 이용..
https://leetcode.com/problems/invert-binary-tree/ Invert Binary Tree - LeetCode Invert Binary Tree - Given the root of a binary tree, invert the tree, and return its root. Example 1: [https://assets.leetcode.com/uploads/2021/03/14/invert1-tree.jpg] Input: root = [4,2,7,1,3,6,9] Output: [4,7,2,9,6,3,1] Example 2: [https://assets.lee leetcode.com Easy.. 그만!! Medium 나왔으면 좋겠다😂 트리의 모든 레벨에서 좌우를 반전시켜주면..