DAY 4 試題
問題描述
給定一個字串 s,要求返回該字串中的最長回文子字串。回文指的是正著讀和反著讀都相同的字串。
範例:Input: s = "...
Problem :
You are given an m x n integer matrix matrix with the following two pr...
Given a 0-indexed integer array nums of size n, find the maximum difference betw...
在「Number of 1 Bits」這道題目中,我們要計算一個無符號整數的二進位表示中有多少個 1。這個問題本質上是在檢查一個數字的二進位中裡面出現多少個 1...
題目
題目翻譯
檢查一串括號是否為合法括號,而合法括號的要件是要左括號等於右括號的數量,並且要兩兩成對,且相同類型的括號要配相同類型的括號(譬如大括號要配大括...
解題程式碼
var isValidSudoku = function (board) {
const posSet = new Set();
for...