Tag: C++ coding exercise
Given the root of a binary tree, each node in the tree has a distinct value. After deleting all nodes with a value in to_delete, we are left with …
Design a Tic-tac-toe game that is played between two players on a n x n grid. You may assume the following rules: A move is guaranteed to be valid …
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: …