在刷題的過程中,不只是題目有解完就好了,因為在面試時還需要將整個解題過程的想法和面試官做討論,所以在這次的挑戰中,我會用口說講解的方式分享超過 30+ 個 LeetCode 題目的解法。
解題程式碼 var RandomizedSet = function () { this.indexMap = new Map(); this.valu...
解題程式碼 Two pointers(此解法更簡單好懂) var findClosestElements = function (arr, k, x) {...
解題程式碼 var WordDictionary = function () { this.root = {}; }; /** * @param {st...
解題程式碼 var isValidSudoku = function (board) { const posSet = new Set(); for...
解題程式碼 var searchRange = function (nums, target) { const binarySearch = (isSear...
解題程式碼 var increasingTriplet = function (nums) { let min = nums[0]; let mid =...
解題程式碼 var pivotIndex = function (nums) { let sum = nums.reduce((tol, acc) =>...
解題程式碼 var canArrange = function (arr, k) { const remainMap = new Map(); for...
解題程式碼 var reverseBetween = function (head, left, right) { const dummy = new Li...
解題程式碼 var findCircleNum = function (isConnected) { const visited = new Set();...