본문 바로가기

전체 글1681

[LeetCode] 953. Verifying an Alien Dictionary - Java • 문제 링크 Verifying an Alien Dictionary - LeetCodeCan you solve this real interview question? Verifying an Alien Dictionary - In an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters.leetcode.com • 풀이 코드public class Solution { public boolean isAlienSorted(String[] words, Str.. 2026. 11. 19.
[LeetCode] 944. Delete Columns to Make Sorted - Java • 문제 링크 Delete Columns to Make Sorted - LeetCodeCan you solve this real interview question? Delete Columns to Make Sorted - You are given an array of n strings strs, all of the same length. The strings can be arranged such that there is one on each line, making a grid. * For example, strs = ["abc", "bceleetcode.com • 풀이 코드public class Solution { public int minDeletionSize(String[] strs) { .. 2026. 11. 18.
[LeetCode] 942. DI String Match - Java • 문제 링크 DI String Match - LeetCodeCan you solve this real interview question? DI String Match - A permutation perm of n + 1 integers of all the integers in the range [0, n] can be represented as a string s of length n where: * s[i] == 'I' if perm[i] leetcode.com • 풀이 코드public class Solution { public int[] diStringMatch(String s) { int n = s.length(), l = 0, r = n; int[] arr = ne.. 2026. 11. 17.
[LeetCode] 941. Valid Mountain Array - Java • 문제 링크= 3 * There exists some i with 0 Valid Mountain Array - LeetCodeCan you solve this real interview question? Valid Mountain Array - Given an array of integers arr, return true if and only if it is a valid mountain array. Recall that arr is a mountain array if and only if: * arr.length >= 3 * There exists some i with 0 leetcode.com • 풀이 코드public class Solution { public boolean validMoun.. 2026. 11. 16.
[LeetCode] 938. Range Sum of BST - Java • 문제 링크 Range Sum of BST - LeetCodeCan you solve this real interview question? Range Sum of BST - Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [low, high]. Example 1: [https://assets.lleetcode.com • 풀이 코드public class Solution { public int rangeSumBST(TreeNode root, int low, int high) { .. 2026. 11. 15.
[LeetCode] 933. Number of Recent Calls - Java • 문제 링크 Number of Recent Calls - LeetCodeCan you solve this real interview question? Number of Recent Calls - You have a RecentCounter class which counts the number of recent requests within a certain time frame. Implement the RecentCounter class: * RecentCounter() Initializes the counter with zeleetcode.com • 풀이 코드import java.util.ArrayDeque;import java.util.Queue;public class RecentCounter { .. 2026. 11. 14.