Category: algorithms
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Input: “aba” Output: True Example 2: Input: …
Given a square array of integers A, we want the minimum sum of a falling path through A. A falling path starts at any element in the first row, …
Given a string S of ‘(‘ and ‘)’ parentheses, we add the minimum number of parentheses ( ‘(‘ or ‘)’, and in any positions ) so that the resulting …
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or …
You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input represents a binary tree. It contains an integer followed by zero, …