Tag: algorithms
Given an array A of positive lengths, return the largest perimeter of a triangle with non-zero area, formed from 3 of these lengths. If it is impossible to form …
Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printed in the last …
On a N * N grid, we place some 1 * 1 * 1 cubes that are axis-aligned with the x, y, and z axes. Each value v = …
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This is case sensitive, for …
Given the root node of a binary search tree, return the sum of values of all nodes with value between L and R (inclusive). The binary search tree is …