Given an integer array nums of length n, you want to create an array ans of leng...
使用 let、var 和 const 宣告變數時分別在:作用域、初始化、重複宣告、重新賦值、提升時有不同的行為。
作用域 scope
var 的作用域是全域或是...
題目:給定一個非負整數陣列 nums,你最初位於陣列的第一個下標。陣列中的每個元素代表你在該位置可以跳躍的最大長度。
判斷你是否能夠到達陣列的最後一個位置。
範...
Problem :
Given an array of distinct integers candidates and a target integer ta...
125. Valid Palindrome
題目描述:一個字串如果在將所有大寫字母轉換為小寫字母並移除所有非字母數字的字符後,正反讀起來相同,則稱為Palind...
100. Same Tree
tags: Easy、Tree
Given the roots of two binary trees p and q, wri...