Count set bits in an integer in C Programming – Bit Algorithm – Simple Method Loop through all bits in an integer, check if bit is set and if then increment
Algorithm
C Programming – Maximum Sum Increasing Subsequence – Dynamic Programming Given an array of n positive integers. To find the sum of maximum sum
C++ Programming – Maximum Sum Increasing Subsequence – Dynamic Programming Given an array of n positive integers. To find the sum of maximum sum
Java Programming – Maximum Sum Increasing Subsequence – Dynamic Programming Given an array of n positive integers. To find the sum of maximum sum
Python Programming – Maximum Sum Increasing Subsequence – Dynamic Programming Given an array of n positive integers. To find the sum of maximum sum
Java Programming – Count ways to reach the n stair – Mathematical Algorithms – The time complexity of above solution is exponential.
C Programming – Count ways to reach the n stair – Mathematical Algorithms – There are n stairs, a person standing at the bottom wants to reach the top.
C Program to Reverse Bits of a Number – Bit Algorithm – Given an unsigned integer, reverse all bits of it and return the number with reversed bits.
Linearity of Expectation Randomized Algorithms – This post is about mathematical concepts like expectation linearity of expectation It covers required topic
C++ Programming Multiply two polynomials – Mathematical Algorithms – A simple solution is to one by one consider every term of first polynomial and multiply