분류 전체보기
-
1356. Sort Integers by The Number of 1 Bits javaLeetCode_Study_Plan/Programming Skills 2022. 9. 24. 16:10
https://leetcode.com/problems/sort-integers-by-the-number-of-1-bits/?envType=study-plan&id=programming-skills-i Sort Integers by The Number of 1 Bits - 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 int[] sortByBits(int[] arr) { Integer[] a = new Integer[ar..
-
217. Contains Duplicate javaLeetCode_Study_Plan/Programming Skills 2022. 9. 24. 15:57
https://leetcode.com/problems/contains-duplicate/?envType=study-plan&id=programming-skills-i Contains Duplicate - 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 boolean containsDuplicate(int[] nums) { HashMap map = new HashMap(); for (int num: nums){ if (ma..
-
242. Valid Anagram javaLeetCode_Study_Plan/Programming Skills 2022. 9. 24. 15:49
https://leetcode.com/problems/valid-anagram/?envType=study-plan&id=programming-skills-i Valid Anagram - 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 boolean isAnagram(String s, String t) { String[] s_arr = s.split(""); String[] t_arr = t.split(""); if (s_..
-
232. Implement Queue using Stacks javaLeetCode_Study_Plan/Programming Skills 2022. 9. 24. 15:38
https://leetcode.com/problems/implement-queue-using-stacks/ Implement Queue using Stacks - 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 MyQueue { ArrayList arr = new ArrayList(); public MyQueue() { } public void push(int x) { this.arr.add(x); } public int pop() { int tmp =..
-
404. Sum of Left Leaves javaLeetCode_Study_Plan/Programming Skills 2022. 9. 24. 15:07
https://leetcode.com/problems/sum-of-left-leaves/?envType=study-plan&id=programming-skills-i Sum of Left Leaves - 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 { int sum = 0; public int sumOfLeftLeaves(TreeNode root) { solve(root, 0); return this.sum; } public void..
-
104. Maximum Depth of Binary Tree javaLeetCode_Study_Plan/Programming Skills 2022. 9. 24. 14:26
https://leetcode.com/problems/maximum-depth-of-binary-tree/?envType=study-plan&id=programming-skills-i Maximum Depth of Binary Tree - 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 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * Tre..
-
876. Middle of the Linked List javaLeetCode_Study_Plan/Programming Skills 2022. 9. 24. 14:15
https://leetcode.com/problems/middle-of-the-linked-list/?envType=study-plan&id=programming-skills-i Middle of the Linked List - 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 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(..
-
1290. Convert Binary Number in a Linked List to Integer javaLeetCode_Study_Plan/Programming Skills 2022. 9. 24. 13:09
https://leetcode.com/problems/convert-binary-number-in-a-linked-list-to-integer/ Convert Binary Number in a Linked List to Integer - 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 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * List..