[LeetCode] 703. Kth Largest Element in a Stream - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/kth-largest-element-in-a-stream/ Kth Largest Element in a Stream - LeetCode Can you solve this real interview question? Kth Largest Element in a Stream - Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element. Implement KthLargest class: leetcode.com 문제 Design a class to f..
[LeetCode] 2466. Count Ways To Build Good Strings
·
알고리즘/LeetCode
https://leetcode.com/problems/count-ways-to-build-good-strings/description/ 문제 Given the integers zero, one, low, and high, we can construct a string by starting with an empty string, and then at each step perform either of the following: Append the character '0' zero times. Append the character '1' one times. This can be performed any number of times. A good string is a string constructed by th..
[LeetCode] 59. Spiral Matrix II - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/spiral-matrix-ii/description/ Spiral Matrix II - LeetCode Can you solve this real interview question? Spiral Matrix II - Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order. Example 1: [https://assets.leetcode.com/uploads/2020/11/13/spiraln.jpg] Input: n = 3 O leetcode.com 문제 Given a positive integer n, generate an ..
[LeetCode] 1572. Matrix Diagonal Sum - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/matrix-diagonal-sum/description/ Matrix Diagonal Sum - LeetCode Can you solve this real interview question? Matrix Diagonal Sum - Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagonal and all the elements on the secondary diagonal that are leetcode.com 문제 Given a square matrix mat, return ..
[LeetCode] 1046. Last Stone Weight - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/last-stone-weight/description/ Last Stone Weight - LeetCode Can you solve this real interview question? Last Stone Weight - You are given an array of integers stones where stones[i] is the weight of the ith stone. We are playing a game with the stones. On each turn, we choose the heaviest two stones and smash them leetcode.com 문제 You are given an array of integers s..
HYOJUN
'알고리즘풀이' 태그의 글 목록 (2 Page)