Tag: algorithm
You have a list of points in the plane. Return the area of the largest triangle that can be formed by any 3 of the points. Example: Input: points …
Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string. Return a list of all possible strings we could create. …
Write a method to check if a given integer is a perfect square e.g. 4, 9, 16, 25 … you cannot use the sqrt or pow functions. One solution …
In this post, we present the final ‘optimized’ solution using Dynamic Programming, which is implemented using a 2 dimensional array with iteration. Let’s review this code: function f($x, $y) …
Given an array of numbers (for simplicity, we use integers), find the maximum value of abs(max left – max right) where we separate the array into two. Mathematically, given …