Given an unsigned integer, swap all odd bits with even bits. For example, if the given number is 23 (00010111), it should be converted to 43 (00101011).
Algorithm
A Simple Solution use Max-Flow based s-t cut algorithm to find minimum cut. Consider every pair of vertices as source ‘s’ and sink ‘t’.
C program to check subsequence – C Programming – User will input two strings and we find if one of the strings is a subsequence of other.
Maximum size square sub-matrix with all 1s – Dynamic Programming Given a binary matrix, find out the maximum size square sub-matrix with all 1s.
Minimum number of jumps to reach end – Dynamic Programming An array of integers where elements represents the max number of steps that can be made forward
Since B has already happened, the sample space reduces to B. So the probability of A happening becomes P(A ∩ B) divided by P(B)
Python Programming – Program for Fibonacci numbers – Dynamic Programming The Fibonacci numbers are the numbers in the following integer sequence.
Java Programming – Program for Fibonacci numbers – Dynamic Programming The Fibonacci numbers are the numbers in the following integer sequence.
C++ Programming – Program for Fibonacci numbers – Dynamic Programming The Fibonacci numbers are the numbers in the following integer sequence.
C Programming – Program for Fibonacci numbers – Dynamic Programming The Fibonacci numbers are the numbers in the following integer sequence.