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

推噓2(2推 0噓 3→)留言5則,0人參與, 2月前最新作者yam276 (史萊哲林的優等生)時間2月前 (2024/03/08 18:25), 2月前編輯資訊
0
0
0
內容預覽:
開始習慣用Rust的小雞巴東西跟縫合怪了==. Code:. use std::collections::HashMap;. impl Solution {. pub fn max_frequency_elements(nums: Vec<i32>) -> i32 {. let mut counts
(還有257個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 2月前最新作者NCKUEECS (小惠我婆)時間2月前 (2024/03/09 11:25), 2月前編輯資訊
1
0
0
內容預覽:
水P幣時間. 2540. Minimim Common Value. 兩個排序過的array,找出同時出現的最小值,沒有就回傳-1. 思路:two pointer. int getCommon(int* nums1, int nums1Size, int* nums2, int nums2Size)
(還有184個字)

推噓1(1推 0噓 0→)留言1則,0人參與, 2月前最新作者sustainer123 (caster )時間2月前 (2024/03/09 17:28), 編輯資訊
0
0
0
內容預覽:
思路:. 找交集的最小值. Python Code:. class Solution:. def getCommon(self, nums1: List[int], nums2: List[int]) -> int:. if set(nums1) & set(nums2):. return min(
(還有33個字)

推噓2(2推 0噓 0→)留言2則,0人參與, 2月前最新作者JIWP (神楽めあ的錢包)時間2月前 (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個字)

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