본문 바로가기

Programming107

[leetcode] DiameterofBinaryTree https://leetcode.com/problems/diameter-of-binary-tree/ Diameter 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 import exam.TreeNode; public class DiameterofBinaryTree { public static void main(String[] args) { TreeNode treeNode1 = new TreeNode(4); TreeNode treeNod.. 2020. 11. 29.
[leetcode] CourseSchedule https://leetcode.com/problems/course-schedule/ Course Schedule - 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 import java.util.ArrayList; import java.util.List; public class CourseSchedule { public static void main(String[] args) { System.out.println(canFinish(2,new int[][] {{0,.. 2020. 11. 29.
[leetcode] CombinationSum https://leetcode.com/problems/combination-sum/ Combination Sum - 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 import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class CombinationSum { public static void main(String[] .. 2020. 11. 29.
[leetcode] WordSearchII https://leetcode.com/problems/word-search-ii/ Word Search II - 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 import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Stack; //Complete public class WordSearchII { public static void main(Str.. 2020. 11. 29.
[leetcode] WordSearch https://leetcode.com/problems/word-search/ Word Search - 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 import java.util.Stack; public class WordSearch { public static void main(String[] args) { char[][] chars = {{'A', 'B', 'C', 'E'}, {'S', 'F', 'C', 'S'}, {'A', 'D', 'E', 'E'}}; S.. 2020. 11. 29.
[leetcode] WordLadder https://leetcode.com/problems/word-ladder/ Word Ladder - 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 public class WordLadder { public static void main(String[] args) { // System.out.println(ladderLength("hit", "cog", Arrays.asList("hot", "dot", "dog", "lot", "log", "cog"))); Sy.. 2020. 11. 29.
[leetcode] WordDictionary https://leetcode.com/problems/design-add-and-search-words-data-structure/ Design Add and Search Words Data Structure - 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 import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class Wor.. 2020. 11. 29.
[leetcode] ValidParentheses https://leetcode.com/problems/valid-parentheses/ Valid Parentheses - 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 import java.util.Stack; public class ValidParentheses { public static void main(String[] args) { System.out.println(isValid("{}[][](()){[[]]}")); } // stack public s.. 2020. 11. 29.
[leetcode] ValidateBinarySearchTree https://leetcode.com/problems/validate-binary-search-tree/ Validate Binary Search 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 import exam.TreeNode; public class ValidateBinarySearchTree { public static void main(String[] args) { TreeNode node6 = new TreeNode(1); TreeNode.. 2020. 11. 29.