C Programming – Replace all ā0ā with ā5ā in an input Integer – Mathematical Algorithms – The idea is simple, we get the last digit using mod operator ā%ā.
C Programming
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
C Programming – Maximum Sum Increasing Subsequence – Dynamic Programming Given an array of n positive integers. To find the sum of maximum sum
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.
C Programming Check for Integer Overflow – Bit Algorithm – The solution of casting to long and adding to find detecting the overflow is not allowed.
C Programming Draw a circle without floating point arithmetic – Mathematical Algorithms – Following program uses a simple concept Let the radius be r.
C Programming Find the smallest number whose digits multiply to a given number n – Mathematical Algorithms – Given a number ānā find the smallest number āpā
C Programming-Find the Number Occurring Odd Number of Times – Bit Algorithm – Given an array of positive integers. All numbers occur even number of times
C Programming – Calculate the angle between hour hand and minute hand – Mathematical Algorithms – The minute hand moves 360 degree in 60 minute( 6 degree)