Programming/Algorithm29 [leetcode] PacificAtlanticWaterFlow https://leetcode.com/problems/pacific-atlantic-water-flow/ Pacific Atlantic Water Flow - 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.ArrayDeque; import java.util.ArrayList; import java.util.List; import java.util.Queue; public class PacificAtlanticWaterFlow { p.. 2020. 11. 29. [leetcode] NumberofIslands https://leetcode.com/problems/number-of-islands/ Number of Islands - 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.ArrayDeque; import java.util.Queue; //Complete public class NumberofIslands { public static void main(String[] args) { char[][] param = new char[][].. 2020. 11. 29. [leetcode] String to Integer (atoi) leetcode.com/problems/string-to-integer-atoi/ String to Integer (atoi) - 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 MyAtoi { public static void main(String[] args) { System.out.println(myAtoi("2147483646")); } public static int myAtoi(String s) { // Discard whites.. 2020. 11. 29. [leetcode] MinStack https://leetcode.com/problems/min-stack/ Min Stack - 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; public class MinStack { private Stack stack; private List list; public stati.. 2020. 11. 29. [leetcode] MinimumPathSum https://leetcode.com/problems/minimum-path-sum/ Minimum Path 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 public class MinimumPathSum { public static void main(String[] args) { System.out.println(minPathSum(new int[][] { {1,3,1}, {1,5,1}, {4,2,1} })); } // DP public static.. 2020. 11. 29. [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. 이전 1 2 3 4 다음