Tag: c++
There is a fence with n posts, each post can be painted with one of the k colors. You have to paint all the posts such that no more …
Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Return true if there exists i, j, …
Given an array nums of n integers and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of the …
Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a function that takes an integer …
You have a set of tiles, where each tile has one letter tiles printed on it. Return the number of possible non-empty sequences of letters you can make. Example …