알고리즘/LeetCode2 leetcode 218. The Skyline Problem 🍀 문제 https://leetcode.com/problems/the-skyline-problem/ The Skyline Problem - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 🍀 나의 코드 class Solution { public List getSkyline(int[][] buildings) { List answer = new ArrayList(); List height = new ArrayList(); // x좌표와 높이 저장 for(int i=0.. 2022. 9. 30. leetcode 658. Find K Closest Elements 자바 🍀 문제 (23) Find K Closest Elements - LeetCode Find K Closest Elements - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 🍀 내 코드 class Solution { public List findClosestElements(int[] arr, int k, int x) { List answer = new ArrayList(); Queue q = new LinkedList(); int max = Math.abs(ar.. 2022. 9. 29. 이전 1 다음