You are given the root of a binary tree. You need to return the zigzag level order traversal of its…
You are given two binary trees p and q. You need to check if the two trees are the same.…
You are given the root of a binary tree. Your task is to find the maximum path sum in the…
You are given the root of a binary tree. Your task is to determine whether the tree is height-balanced. A…
You are given an integer k and an array prices where prices[i] is the price of a stock on day…
You are given an array prices where prices[i] is the price of a stock on day i. You are allowed…
You are given an array prices where prices[i] is the price of a stock on day i. You may complete…
You are given two strings word1 and word2. In one operation, you can delete exactly one character from either string.…
Given a string s, return the minimum number of insertions needed to make s a palindrome. You can insert characters…
Given a string s, find the length of the longest palindromic subsequence in s. A subsequence keeps relative order but…