在刷題的過程中,不只是題目有解完就好了,因為在面試時還需要將整個解題過程的想法和面試官做討論,所以在這次的挑戰中,我會用口說講解的方式分享超過 30+ 個 LeetCode 題目的解法。
解題程式碼 var characterReplacement = function(s, k) { let maxLength = 1; let...
解題程式碼 var largestNumber = function (nums) { nums = nums.sort((a, b) => '' +...
解題程式碼 解法 1. var isBalanced = function (root) { if (!root) return true; if (...
解題程式碼 var isSubtree = function (root, subRoot) { const isSameTree = (p, q) =&g...
解題程式碼 var pathSum = function (root, targetSum) { if (!root) return []; const...
解題程式碼 var pathSum = function (root, targetSum) { if (!root) return 0; let pa...
解題程式碼 var distanceK = function (root, target, k) { const graphMap = new Map();...
解題程式碼 var canFinish = function (numCourses, prerequisites) { let queue = [];...
解題程式碼 var findMinHeightTrees = function (n, edges) { if (n === 1) return [0];...
解題程式碼 var exist = function (board, word) { const DFS = (i, j, wordIndex) =>...