Tag: c++
Given a m * n matrix mat and an integer K, return a matrix answer where each answer is the sum of all elements mat for i – K …
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path …
Given an array of strings, group anagrams together. Example: Input: , Output: , , ] Note: All inputs will be in lowercase. The order of your output does not …
Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. After doing so, return the …
There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, …, N-1, and each room may have some keys …