LeetCode: 2225-Find Players With Zero or One Losses 解題紀錄
題目
You are given an integer array matches
where matches[i] = [winneri, loseri]
indicates that the player winneri
defeated player loseri
in a match.
You are given an integer array matches
where matches[i] = [winneri, loseri]
indicates that the player winneri
defeated player loseri
in a match.
Given an integer array nums
, return the number of all the arithmetic subsequences of nums
.
ou are given two strings s
and t
consisting of only lowercase English letters.
Return the minimum number of characters that need to be appended to the end of s
so that t
becomes a subsequence of s
.
Given a positive integer n
, find the pivot integer x
such that:
1
and x
inclusively equals the sum of all elements between x
and n
inclusively.bisect 是一個 Python 的內建模組,其主要功能是維持一個排序後的 List 順序,讓該 List 在進行插入(insert)操作後無需重新排序整個 List。
Read More »[Python] 陣列二分演算法(Array bisection algorithm)bisect 筆記tmux 一直以來都受到許多 Linux 使用者的喜愛,除了可以多開、視窗命名、方便管理的快捷鍵..... 以外,最重要的是它內部所執行的進程一直都放在背景,不會隨著關閉終端機而終止程序,非常方便。
Read More »[Linux] 使用指令開啟 tmux 新視窗並執行指令今天我在建立深度學習模型時,因為返回的資訊缺漏,導致出現了以下這個錯誤訊息:
TypeError: cannot unpack non-iterable float object
Read More »[已解決] `TypeError: cannot unpack non-iterable float object` OR `TypeError: 'float' object is not iterable`隨著專案開發計畫越來越講究執行速度、記憶體存取率,我們顯然很有必要了解自己的程式中,那些變數啊、物件啊究竟使用了多少的記憶體。
Read More »[Python] 如何計算變數、物件存取了多少記憶體Given an m x n
grid of characters board
and a string word
, return true
if word
exists in the grid.