上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 80 下一页
摘要: /** * https://www.hackerrank.com/challenges/dynamic-array/problem * */ class DynamicArray { var lastAnswer = 0 var answerList: ArrayList<Int>? = null 阅读全文
posted @ 2020-04-22 00:52 johnny_zhao 阅读(229) 评论(0) 推荐(0)
摘要: package LeetCode_261 import java.util.* /** * 261. Graph Valid Tree * Lock by leetcode * https://www.lintcode.com/problem/graph-valid-tree/description 阅读全文
posted @ 2020-04-20 10:58 johnny_zhao 阅读(90) 评论(0) 推荐(0)
摘要: package LeetCode_1306 import java.util.* /** * 1306. Jump Game III * https://leetcode.com/problems/jump-game-iii/description/ * Given an array of non- 阅读全文
posted @ 2020-04-17 20:47 johnny_zhao 阅读(95) 评论(0) 推荐(0)
摘要: package LeetCode_45 /** * 45. Jump Game II * https://leetcode.com/problems/jump-game-ii/description/ * * Given an array of non-negative integers, you 阅读全文
posted @ 2020-04-17 12:39 johnny_zhao 阅读(120) 评论(0) 推荐(0)
摘要: /* * queue.push(start) * step = 0 * while (queue.isNotEmpty()){ * step++ * size = queue.size * //scan current level * while (size-->0){ * node = queue 阅读全文
posted @ 2020-04-17 12:38 johnny_zhao 阅读(129) 评论(0) 推荐(0)
摘要: import java.util.* class Solution { fun minDepth(root: TreeNode?): Int { if (root == null) { return 0 } var depth = 0 //LinkedList实现了Queue接口,可以用作队列使用 阅读全文
posted @ 2020-04-16 14:43 johnny_zhao 阅读(197) 评论(0) 推荐(0)
摘要: /* * For your reference: * * DoublyLinkedListNode { * int data; * DoublyLinkedListNode next; * DoublyLinkedListNode prev; * } */ static DoublyLinkedLi 阅读全文
posted @ 2020-04-14 13:19 johnny_zhao 阅读(122) 评论(0) 推荐(0)
摘要: package LeetCode_11 /** * 11. Container With Most Water * https://leetcode.com/problems/container-with-most-water/description/ * */ class Solution { f 阅读全文
posted @ 2020-04-14 12:09 johnny_zhao 阅读(102) 评论(0) 推荐(0)
摘要: package LeetCode_1367 import LeetCode_1382.TreeNode import LeetCode_390.ListNode /** * 1367. Linked List in Binary Tree * https://leetcode.com/problem 阅读全文
posted @ 2020-04-09 22:09 johnny_zhao 阅读(183) 评论(0) 推荐(0)
摘要: package LeetCode_486 /** * 486. Predict the Winner * https://leetcode.com/problems/predict-the-winner/description/ * https://www.youtube.com/watch?v=g 阅读全文
posted @ 2020-04-09 22:03 johnny_zhao 阅读(131) 评论(0) 推荐(0)
上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 80 下一页