討論串[閒聊] 每日leetcode
共 1548 篇文章

推噓3(3推 0噓 1→)留言4則,0人參與, 1年前最新作者sustainer123 (caster )時間1年前 (2024/03/11 10:45), 編輯資訊
0
0
1
內容預覽:
思路:. 用字典紀錄順序 之後sorted排序. 為了避免key error 所以使用dic.get() 假如x不在dic 回傳27. Python Code:. class Solution:. def customSortString(self, order: str, s: str) -> s
(還有89個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 1年前最新作者Rushia (みけねこ的鼻屎)時間1年前 (2024/03/11 09:41), 編輯資訊
0
1
1
內容預覽:
https://leetcode.com/problems/custom-sort-string/description. 791. Custom Sort String. 給你一個字串s和一個表示字元排序優先的字串order,排序字串s,如果字元不在 order的話順序隨意。. 思路:. 1.創建
(還有386個字)

推噓2(2推 0噓 2→)留言4則,0人參與, 1年前最新作者sustainer123 (caster )時間1年前 (2024/03/10 16:57), 編輯資訊
0
0
0
內容預覽:
思路:取交集. Python Code:. class Solution:. def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:. return set(nums1) & set(nums2). 又是ez

推噓2(2推 0噓 6→)留言8則,0人參與, 1年前最新作者DJYOSHITAKA (franchouchouISBEST)時間1年前 (2024/03/10 14:01), 1年前編輯資訊
0
0
0
內容預覽:
最近好多easy 又水了一天. 亂寫一通. 349. Intersection of Two Arrays. Given two integer arrays nums1 and nums2, return an array of their. intersection. Each element
(還有579個字)

推噓2(2推 0噓 0→)留言2則,0人參與, 1年前最新作者JIWP (神楽めあ的錢包)時間1年前 (2024/03/09 22:08), 編輯資訊
0
1
0
內容預覽:
感覺沒很難,不過還是寫了很久. 我好爛. https://imgur.com/iIQ9Orr. 146. LRU Cache. 請設計一個Data structure 可以實現Least Recently Used cache. 要包含Constructor、get、put這三個function.
(還有2653個字)