본문 바로가기

Programming107

[leetcode] MergeKLists leetcode.com/problems/merge-k-sorted-lists/ Merge k Sorted Lists - 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.Comparator; import java.util.List; public class MergeKLists { public static void main(String[] args) { ListNode node5 = ne.. 2020. 11. 29.
[leetcode] MergeIntervals https://leetcode.com/problems/merge-intervals/ Merge Intervals - 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.Comparator; //Complete public class MergeIntervals { public static void main(String[] args) { // Sy.. 2020. 11. 29.
[leetcode] LRUCache https://leetcode.com/problems/lru-cache/ LRU Cache - 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.LinkedHashMap; import java.util.Map; public class LRUCache { public static void main(String[] args) { // ["LRUCache","get","put","get","put","put","get","get"] // [.. 2020. 11. 29.
[leetcode] IsValidSudoku https://leetcode.com/problems/valid-sudoku/ Valid Sudoku - 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.HashSet; import java.util.Set; public class IsValidSudoku { public static void main(String[] args) { char[][] board = new char[][]{{'5','3','.','.','7','.','... 2020. 11. 29.
[leetcode] intToRoman https://leetcode.com/problems/integer-to-roman/ Integer to Roman - 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.TreeMap; public class IntegerToRoman { public static void main(String[] args) { System.out.println(intToRoman(800)); } // greedy public static String .. 2020. 11. 29.
[leetcode] BinaryTreeLevelOrderTraversal https://leetcode.com/problems/binary-tree-level-order-traversal/ Binary Tree Level Order Traversal - 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 BinaryTreeLevelOrderTraversal { public List levelOrder(TreeNode root).. 2020. 11. 29.
[Design Pattern] 01. Strategy Patten - 전략 패턴 여러 알고리즘을 하나의 추상적인 접근점을 만들어 접근점에서 서로 교환 가능하도록 하는 패턴 인터페이스 : 기능에 대한 선언과 구현을 분리. 기능을 사용하는 통로 2020. 10. 30.
[Design Pattern] 패턴 목록 01. Strategy Patten 02. Adapter Pattern 03. TemplateMethod Pattern 04. TemplateFactory Pattern 05. Singleton Pattern 06. Prototype Pattern 07. Builder Pattern 08. AbstractFactory Pattern 09. BridgePattern Pattern 10. Composite Pattern 11. Decorator Pattern 12. Visitor Pattern 13. ChainOfResposibility-Advanced Pattern 14. Facade Pattern 15. Observer Pattern 16. Mediator Pattern 17. State Pattern .. 2020. 10. 30.