Tag: algorithm
Given an N by N matrix of letters matrix, return whether there are exactly N different letters that appear in the matrix and each letter appears exactly once in …
Given a list of integers nums, return the minimum cost of sorting the list in ascending or descending order. The cost is defined as the sum of differences between …
You’re given a list of n integers arr. You must compute a list output such that, for each index i (between 0 and n-1, inclusive), output is equal to …
The leetcode web coding IDE has a premium debugger feature – however this is not enabled during the contest. Recently I found out that you can actually print to …
A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Find all strobogrammatic numbers that are of length = n. Example: …