712 Minimum Ascii Delete Sum For Two Strings
Minimum ASCII Delete Sum for Two Strings Given two strings s1 and s2, return the lowest ASCII sum of deleted characters to make two strings equal. Example 1: **Input:** s1 = "sea", s2 = "ea...
Minimum ASCII Delete Sum for Two Strings Given two strings s1 and s2, return the lowest ASCII sum of deleted characters to make two strings equal. Example 1: **Input:** s1 = "sea", s2 = "ea...
Smallest Subtree with all the Deepest Nodes Given the root of a binary tree, the depth of each node is the shortest distance to the root. Return the smallest subtree such that it contains all th...
Max Dot Product of Two Subsequences Given two arrays nums1 and nums2. Return the maximum dot product between non-empty subsequences of nums1 and nums2 with the same length. A subsequence of a a...
Maximum Product of Splitted Binary Tree Given the root of a binary tree, split the binary tree into two subtrees by removing one edge such that the product of the sums of the subtrees is maximize...
Maximum Level Sum of a Binary Tree Given the root of a binary tree, the level of its root is 1, the level of its children is 2, and so on. Return the smallest level x such that the sum of all th...
Four Divisors Given an integer array nums, return the sum of divisors of the integers in that array that have exactly four divisors. If there is no such integer in the array, return 0. Exampl...
N-Repeated Element in Size 2N Array You are given an integer array nums with the following properties: nums.length == 2 * n. nums contains n + 1 **unique** elements. Exactly one element of nums ...
Plus One You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least signific...
Last Day Where You Can Still Cross There is a 1-based binary matrix where 0 represents land and 1 represents water. You are given integers row and col representing the number of rows and columns ...
Magic Squares In Grid A 3 x 3 magic square is a 3 x 3 grid filled with distinct numbers from **1 to **9 such that each row, column, and both diagonals all have the same sum. Given a row x col gr...