A sentence consists of lowercase letters ('a' to 'z'), digits ('0' to '9'), hyph...
Problem :
Given the root of a binary tree, imagine yourself standing on the righ...
Problem :
Given an m x n grid of characters board and a string word, return true...
226. Invert Binary Tree
題目描述得非常簡單,給定一棵二元樹,你需要翻轉它,將左子樹與右子樹互換,輸出這棵樹翻轉後的結果。使用遞迴的解法:...
1382. Balance a Binary Search Tree
給定一個二叉搜索樹 (BST),你的目標是將其轉換為一棵高度平衡的二叉搜索樹。高度平衡的意...
DAY 9 試題
問題描述
給定一個字串 s 和一個字典 wordDict,其中字典包含多個單詞。請判斷字串 s 是否能夠被分割為一組以空格分隔的字典單詞序列...