Category: c / c++
A happy string is a string that: consists only of letters of the set . s != s for all values of i from 1 to s.length – 1 …
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 …
We have a collection of stones, each stone has a positive integer weight. Each turn, we choose the two heaviest stones and smash them together. Suppose the stones have …
Given a number s in their binary representation. Return the number of steps to reduce it to 1 under the following rules: If the current number is even, you …