Number of Good Pairs
Count pairs of indices whose values are equal and whose first index comes before the second.
View on LeetCodeProblem solving
Count pairs of indices whose values are equal and whose first index comes before the second.
View on LeetCodeReplace every array value with the sum of its digits and return the smallest resulting value.
View on LeetCodeRepeatedly replace adjacent digit pairs with their sum modulo 10 and check whether the final two digits match.
View on LeetCodeLatest work
Count pairs of indices whose values are equal and whose first index comes before the second.
View project detailsReplace every array value with the sum of its digits and return the smallest resulting value.
View project detailsCreate a target array by inserting each value at its corresponding index in order.
View project details