原创 Windows 10 安裝 CUDA 失敗之屢敗屢戰

想要在 Windows 10 + 1060 上搭一下 TensorFlow 的環境,可是安裝 CUDA 一直,嘗試了 N 種方法,最後使用 DDU 工具在安全模式下卸載了 NVIDIA 相關的內容,重新安裝後就成功了,如果其他方式

原创 【Leetcode】1. 兩數之和(Two Sum)

Leetcode - 1 Two Sum (Easy) 題目描述:給定一個數組,返回相加和爲 target 的兩個元素的下標。 Given nums = [2, 7, 11, 15], target = 9, Because n

原创 【Leetcode】1010. 總持續時間可被 60 整除的歌曲(Pairs of Songs With Total Durations Divisible by 60)

Leetcode - 1010 Pairs of Songs With Total Durations Divisible by 60 (Easy) 題目描述:數組中每個元素表示歌曲的播放時間,找出所有兩首歌曲時間相加之和是 60

原创 【Leetcode】27. 移除元素(Remove Element)

Leetcode - 27 Remove Element (Easy) 題目描述:在不使用額外空間的情況下,刪除數組中的 val,返回刪除後的數組長度。 Given nums = [3,2,2,3], val = 3, Your

原创 【Leetcode】3. 無重複字符的最長子串(Longest Substring Without Repeating Characters)

Leetcode - 3 Longest Substring Without Repeating Characters (Medium) Input: "abcabcbb" Output: 3 Explanation: The

原创 【Leetcode】628. 三個數的最大乘積(Maximum Product of Three Numbers)

Leetcode - 628 Maximum Product of Three Numbers (Easy) 題目描述:給定一個數組,找出三個數的最大乘積。 Input: [1,2,3,4] Output: 24 解題思路:三個

原创 【Leetcode】746. 使用最小花費爬臺階(Min Cost Climbing Stairs)

Leetcode - 746 Min Cost Climbing Stairs (Easy) 題目描述:給定一個數組,每個元素表示爬到臺階所花費的體力,每次能夠向上爬一個或者兩個臺階,求最小體力花費的爬法。 Input: cost

原创 【Leetcode】2. 兩數相加(Add Two Numbers)

Leetcode - 2 Add Two Numbers (Medium) 題目描述:使用鏈表表示兩個正整數,返回兩正整數相加結果,使用鏈表表示。 Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Outp

原创 【Leetcode】4. 尋找兩個有序數組的中位數(Median of Two Sorted Arrays)

Leetcode - 4 Median of Two Sorted Arrays (Hard) 題目描述:要求時間複雜度爲 O(log(m + n))。 nums1 = [1, 3] nums2 = [2] The median

原创 【Leetcode】118. 楊輝三角(Pascal's Triangle)

Leetcode - 118 Pascal’s Triangle (Easy) Input: 5 Output: [ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,

原创 劍指 Offer 最全題解——快速刷題

劍指Offer - Java題解 「上」 劍指Offer - Java題解 「中」 劍指Offer - Java題解 「下」 點贊 收藏 分享 文章舉報 str_818

原创 JSON Web Token 入門教程

轉載自:JSON Web Token 入門教程 - 阮一峯 JSON Web Token(縮寫 JWT)是目前最流行的跨域認證解決方案,本文介紹它的原理和用法。 一、跨域認證的問題 互聯網服務離不開用戶認證。一般流程是下面這樣。

原创 【Leetcode】29. 兩數相除(Divide Two Integers)

Leetcode - 29 Divide Two Integers (Medium) 題目描述:不使用乘法、除法和 mod 運算符。 Input: dividend = 10, divisor = 3 Output: 3 解題思

原创 【Leetcode】19. 刪除鏈表的倒數第 n 個節點(Remove Nth Node From End of List)

Leetcode - 19 Remove Nth Node From End of List (Medium) Given linked list: 1->2->3->4->5, and n = 2. After removin

原创 【Leetcode】21. 合併兩個有序鏈表(Merge Two Sorted Lists)

Leetcode - 21 Merge Two Sorted Lists (Easy) Input: 1->2->4, 1->3->4 Output: 1->1->2->3->4->4 解法一:迭代 public ListNod