原创 寫給計算機學院的學弟學妹們

半年前,我寫過一篇微信推送,給想走計算機這條路的學弟學妹們一些自己的建議。 半年後,真正在計算機學院待了一學期之後,我對計算機的認知又有了新的看法。 於是,想重新寫一篇博客,想盡我所能地讓學弟學妹們少走點歪路吧。 To st

原创 LeetCode | 1409. Queries on a Permutation With Key查詢帶鍵的排列【Python】

LeetCode 1409. Queries on a Permutation With Key查詢帶鍵的排列【Medium】【Python】【模擬】 Problem LeetCode Given the array quer

原创 LeetCode | 1410. HTML Entity Parser HTML 實體解析器【Python】

LeetCode 1410. HTML Entity Parser HTML 實體解析器【Medium】【Python】【字符串】 Problem LeetCode HTML entity parser is the pars

原创 LeetCode | 1394. Find Lucky Integer in an Array找出數組中的幸運數【Python】

LeetCode 1394. Find Lucky Integer in an Array找出數組中的幸運數【Easy】【Python】【暴力】 Problem LeetCode Given an array of integ

原创 LeetCode | 0509. Fibonacci Number斐波那契數【Python】

LeetCode 0509. Fibonacci Number斐波那契數【Easy】【Python】【動態規劃】 Problem LeetCode The Fibonacci numbers, commonly denoted

原创 LeetCode | 面試題09. 用兩個棧實現隊列【劍指Offer】【Python】

LeetCode 面試題09. 用兩個棧實現隊列【劍指Offer】【Easy】【Python】【棧】【隊列】 問題 力扣 用兩個棧實現一個隊列。隊列的聲明如下,請實現它的兩個函數 appendTail 和 deleteHead

原创 LeetCode | 1390. Four Divisors四因數【Python】

LeetCode 1390. Four Divisors四因數【Medium】【Python】【數學】 Problem LeetCode Given an integer array nums, return the sum

原创 LeetCode | 1385. Find the Distance Value Between Two Arrays兩個數組間的距離值【Python】

LeetCode 1385. Find the Distance Value Between Two Arrays兩個數組間的距離值【Easy】【Python】【暴力】 Problem LeetCode Given two i

原创 LeetCode | 1389. Create Target Array in the Given Order按既定順序創建目標數組【Python】

LeetCode 1389. Create Target Array in the Given Order按既定順序創建目標數組【Easy】【Python】【數組】 Problem LeetCode Given two arr

原创 LeetCode | 0409. Longest Palindrome最長迴文串【Python】

LeetCode 0409. Longest Palindrome最長迴文串【Easy】【Python】【字符串】 Problem LeetCode Given a string which consists of lower

原创 LeetCode | 0106. Construct Binary Tree from Inorder and Postorder Traversal從中序與後序遍歷序列構造二叉樹【Python】

LeetCode 0106. Construct Binary Tree from Inorder and Postorder Traversal從中序與後序遍歷序列構造二叉樹【Medium】【Python】【二叉樹】【遞歸】

原创 LeetCode | 面試題04. 二維數組中的查找【劍指Offer】【Python】

LeetCode 面試題04. 二維數組中的查找【劍指Offer】【Easy】【Python】【數組】 問題 力扣 在一個 n * m 的二維數組中,每一行都按照從左到右遞增的順序排序,每一列都按照從上到下遞增的順序排序。請完

原创 LeetCode | 0240. Search a 2D Matrix II搜索二維矩陣 II【Python】

LeetCode 0240. Search a 2D Matrix II搜索二維矩陣 II【Medium】【Python】【數組】 Problem LeetCode Write an efficient algorithm t

原创 LeetCode | 面試題 01.06. 字符串壓縮【Python】

LeetCode 面試題 01.06. 字符串壓縮【Easy】【Python】【雙指針】 問題 力扣 字符串壓縮。利用字符重複出現的次數,編寫一種方法,實現基本的字符串壓縮功能。比如,字符串aabcccccaaa會變爲a2b1

原创 LeetCode | 面試題03. 數組中重複的數字【劍指Offer】【Easy】【Python】【數組】【哈希表】【排序】

LeetCode 面試題03. 數組中重複的數字【劍指Offer】【Easy】【Python】【數組】【哈希表】【排序】 問題 力扣 找出數組中重複的數字。 在一個長度爲 n 的數組 nums 裏的所有數字都在 0~n-1 的