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 …
There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with …
Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1. Sort the elements of arr1 such that the …
You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that amount. You may …
Given a string S, remove the vowels ‘a’, ‘e’, ‘i’, ‘o’, and ‘u’ from it, and return the new string. Example 1: Input: “leetcodeisacommunityforcoders” Output: “ltcdscmmntyfrcdrs” Example 2: Input: …