Category: c / c++
Given a balanced parentheses string S, compute the score of the string based on the following rule: () has score 1 AB has score A + B, where A …
Given an array A of integers and integer K, return the maximum S such that there exists i < j with A + A = S and S < …
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 …