Tag: c++
Given an array of integers nums, you start with an initial positive value startValue. In each iteration, you calculate the step by step sum of startValue plus elements in …
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 …