LeetCode
文章平均质量分 68
TWCSrookie
人生25方始悟
展开
-
[python]LeetCode_633. Sum of Square Numbers
[python]LeetCode_633. Sum of Square Numbers文章目录[python]LeetCode_633. Sum of Square Numbers牽涉概念及時間紀錄一、題目內容二、想法思路1.直觀想法:2.覺得太慢了,想優化一下:总结牽涉概念及時間紀錄20220409 16:15-16:24 for 第一次與167題相似使用頭尾往中間的查找法a**2與aa的速度比較,aa快很多一、題目內容簡而言之:給一數字是否可以由兩個數字的平方值相加而得呢?以下原创 2022-04-09 16:54:48 · 831 阅读 · 0 评论 -
[python]LeetCode_167. Two Sum II - Input Array Is Sorted
[python]LeetCode_167. Two Sum II - Input Array Is Sorted文章目录[python]LeetCode_167. Two Sum II - Input Array Is Sorted牽涉概念及時間紀錄一、題目內容二、想法思路1.直觀想法:2.想想發現不太對,優化一下:总结牽涉概念及時間紀錄20220408 17:08-17:20 for 第一次使用雙指針方式能降低時間複雜度當需要雙迴圈時可以往此方向考慮一、題目內容簡而言之:就是給定一個原创 2022-04-08 20:13:30 · 762 阅读 · 0 评论 -
[python]LeetCode_796. Rotate String
[python]LeetCode_796. Rotate String文章目录[python]LeetCode_796. Rotate String牽涉概念及時間紀錄一、題目內容二、想法思路1.直觀想法:2.由於只有better than 66%故參考他人作法:总结牽涉概念及時間紀錄20220407 11:08-11:19 for 第一次直接使用字串比較。較佳解為使用KMP 演算法實作。一、題目內容Given two strings s and goal, return true if原创 2022-04-07 15:56:21 · 664 阅读 · 0 评论 -
[python]LeetCode_744. Find Smallest Letter Greater Than Target
[python]LeetCode_744. Find Smallest Letter Greater Than Target文章目录[python]LeetCode_744. Find Smallest Letter Greater Than Target牽涉概念及時間紀錄一、題目內容二、想法思路1.直觀想法:2.重新看一遍題目後:总结牽涉概念及時間紀錄20220403 17:43-17:54 for 第一次使用binary search 即可在python 中要判斷ascii 要用 ord(原创 2022-04-03 19:01:55 · 790 阅读 · 0 评论