herrDeng網內搜尋
自訂搜尋
Ads
2025年3月13日 星期四
2025年3月8日 星期六
C++ Py3 Sliding window速解Leetcode 2379 Minimum Recolors to Get K Consec...
C++ Py3 Sliding window速解2379 Minimum Recolors to Get K Consecutive Black Blocks
[Py3 解含過程輸出請進]
2025年3月3日 星期一
2025年2月26日 星期三
C++ prefix sum Kadane Python一行解Leetcode 1749. Maximum Absolute Sum of An...
cpp prefix sum Kadane Python一行解Leetcode 1749. Maximum Absolute Sum of Any Subarray
[解答請進]
2025年2月19日 星期三
C++py3排列組合與binary表達解Leetcode 1415 The k th Lexicographical String of Al...
C++py3排列組合與binary表達解Leetcode 1415 The k th Lexicographical String of All Happy Strings of Length n
總共有3*2^(n-1)個happy strings要求第k個。先算(k-1)除以2^(n-1)的商q與餘數r,s[0]由q決定,s[1:n]由r決定,化r為二進位,然後簡單處理一下就得解
[Py3解請進]
2025年2月18日 星期二
C++ Py3 reverse 2pointer解Leetcode 2375 Construct Smallest Number From D...
C++ Py3 reverse 2pointer解Leetcode 2375 Construct Smallest Number From DI String
訂閱:
文章 (Atom)
熱門文章
-
計算你上學期加權平均
-
河內塔程式
-
將費氏數列輸出至一long 陣列 其中f[0]=1, f[1]=2, f[n]=f[n-1]+f[n-2] (n>=2)
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
Fibonacci sequence: a[0]=1, a[1]=1, a[2]=2, a[3]=3, a[4]=5,...... In general, a[n]=1 as n=0,1, a[n]=a[n-1]+a[n-2] as n>=2. Use this...
-
簡答題: 比較C/C++, Java, VB的差異!
-
算上學期加權平均
-
LinkedList Exercise mm/dd Java 中的 LinkedList mm/dd 列印課表 mm/dd GCD mm/dd Ex2 mm/dd 用Eclipse寫hello.java mm/dd
-
計算你的BMI
