Java613 [LeetCode/Java] Shuffle the Array -Codeclass Solution { public int[] shuffle(int[] nums, int n) { int[] answer = new int[n * 2]; int idx = 0; for (int i = 0; i 2025. 11. 24. [LeetCode/Java] Concatenation of Array -Codeclass Solution { public int[] getConcatenation(int[] nums) { int len = nums.length * 2; int[] answer = new int[len]; for (int i = 0; i 2025. 11. 24. [LeetCode/Java] 94. Binary Tree Inorder Traversal -Code/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode() {} * TreeNode(int val) { this.val = val; } * TreeNode(int val, TreeNode left, TreeNode right) { * this.val = val; * this.left = left; * this.right = right; * } * } */class Solution { List answer; public List i.. 2025. 11. 23. [백준/Java] 15216번 Another Brick in the Wall -Codeimport java.util.Scanner;public class BOJ15216 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int h = sc.nextInt(); int w = sc.nextInt(); int n = sc.nextInt(); int[] blocks = new int[n]; for (int i = 0; i 2025. 11. 23. [LeetCode/Java] 83. Remove Duplicates from Sorted List -Codeclass Solution { public ListNode deleteDuplicates(ListNode head) { // 처음 위치 저장 ListNode answer = new ListNode(-101); // 현재 노드 위치 저장 ListNode cur = answer; while(head != null) { int now = head.val; // 현재 값과 다른 경우 저장 if (now != cur.val) { ListNode addNode = new ListNode(now); cur.next = addNod.. 2025. 11. 22. [LeetCode/Java] 70. Climbing Stairs -Codeclass Solution { public int climbStairs(int n) { int before = 0; int answer = 1; for (int i = 0; i 2025. 11. 22. 이전 1 ··· 81 82 83 84 85 86 87 ··· 103 다음