摘要:
/** * https://www.hackerrank.com/challenges/dynamic-array/problem * */ class DynamicArray { var lastAnswer = 0 var answerList: ArrayList<Int>? = null 阅读全文
摘要:
package LeetCode_261 import java.util.* /** * 261. Graph Valid Tree * Lock by leetcode * https://www.lintcode.com/problem/graph-valid-tree/description 阅读全文
摘要:
package LeetCode_1306 import java.util.* /** * 1306. Jump Game III * https://leetcode.com/problems/jump-game-iii/description/ * Given an array of non- 阅读全文
摘要:
package LeetCode_45 /** * 45. Jump Game II * https://leetcode.com/problems/jump-game-ii/description/ * * Given an array of non-negative integers, you 阅读全文
摘要:
/* * queue.push(start) * step = 0 * while (queue.isNotEmpty()){ * step++ * size = queue.size * //scan current level * while (size-->0){ * node = queue 阅读全文
摘要:
import java.util.* class Solution { fun minDepth(root: TreeNode?): Int { if (root == null) { return 0 } var depth = 0 //LinkedList实现了Queue接口,可以用作队列使用 阅读全文
摘要:
/* * For your reference: * * DoublyLinkedListNode { * int data; * DoublyLinkedListNode next; * DoublyLinkedListNode prev; * } */ static DoublyLinkedLi 阅读全文
摘要:
package LeetCode_11 /** * 11. Container With Most Water * https://leetcode.com/problems/container-with-most-water/description/ * */ class Solution { f 阅读全文
摘要:
package LeetCode_1367 import LeetCode_1382.TreeNode import LeetCode_390.ListNode /** * 1367. Linked List in Binary Tree * https://leetcode.com/problem 阅读全文
摘要:
package LeetCode_486 /** * 486. Predict the Winner * https://leetcode.com/problems/predict-the-winner/description/ * https://www.youtube.com/watch?v=g 阅读全文