[Link] https://leetcode.com/problems/integer-to-roman/ class Solution { public String intToRoman(int num) { int[] arr = new int[4]; // 0 : 1st digit 1: 2st ... StringBuilde...
LeetCode. 11. Container With Most Water
[Link] https://leetcode.com/problems/container-with-most-water/ class Solution { public int maxArea(int[] height) { int start = 0, end = height.length - 1, max = 0; while(s...
Sort. Radix Sort
Radix Sort Time Complexity: O(nw) (n: number of items, w: length of item) Space Complexity: O(n+w) function radixSort(array) { let max; let digitArr = new Array(10); for (let i = 0; i <...
BOJ. Tree (4803)
[Link] https://www.acmicpc.net/problem/4803 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static int max = 0, maxIdx = 0; public static void main(String...