Category: algorithms
Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. Example: Input: S = “loveleetcode”, …
Given two non-negative integers represented by strings, return the sum of both. You should not use any BigInteger library nor convert the inputs to integer types directly, as the …
An array is called monotonic if it is either monotone increasing or monotone decreasing. An array A is monotone increasing if for all i <= j, A <= A. …
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 …
Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. Please note that the string does not contain …