## Minimum number of AND operations to make all array elements zero

I came across this question in a programming contest:We are given an array consisting of n elements. At each iteration, you can select any two elements ai and aj and replace ai with ai & aj. & is the bitwise AND operator. Find the minimum number of AND operations needed...
Read More

## How to get the least possible combination for a coin change problem in C# using recursion

I'm quite new to C# and I have a recursion issue to solve. I want to get the least number of coins possible in this coin change problem. I've adapted an algorithm to it but I need to return an object of type Change which will contain the minimum possible...
Read More

## How to find the minimum number of operation(s) to make the string good?

Can I apply dynamic programming to it ?I don't think you really need dynamic programming here.One approach in O(length(S)) time:
Read More

## How to find the minimum number of operation(s) to make the string balanced?

A string is considered balanced if and only if all the characters occur in it equal number of times.You are given a string S; this string may only contain uppercase English letters. You may perform the following operation any number of times (including zero):
Read More

## No. of distinct subsequences of length 3 in an array of length n

How to calculate the number of distinct sub sequences of length 3 (or in general of length k < n) in an array of length n?
Read More