題目:給定幾種不同面額的硬幣,硬幣數量不限,要求用最少的硬幣數量湊出一個指定的金額 amount。如果無法湊出這個金額,則回傳 -1。
範例:
輸入: coin...
解題程式碼
var isNStraightHand = function (hand, groupSize) {
const handMap = new M...
解題程式碼
var characterReplacement = function(s, k) {
let maxLength = 1;
let...
112. Path Sum [Easy]###
在二元樹中,判斷是否存在一條從根到葉子的路徑,路徑上節點值的總和等於 targetSum。
class Solu...
題目
3217. Delete Nodes From Linked List Present in Array難度: 中等
題意
給定一個鏈結串列head與一整...
原文題目
Given an m x n integer matrix matrix, if an element is 0, set its entire ro...