[LeetCode] 735. Asteroid Collision - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/asteroid-collision/ Asteroid Collision - LeetCode Can you solve this real interview question? Asteroid Collision - We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represents its size, and the sign represents its direction (positive meaning leetcode.com 문제 We are given an array asteroids of integers r..
[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 ..
HYOJUN
'algorythm' 태그의 글 목록