C Program to Check Whether a Number is Palindrome

Palindrome is a number or sequence of characters which reads same backward and forward. If we reverse a palindrome number, the reversed and original number will be same. The first C program checks whether a number is palindrome by reversing the number. The second program does the same thing without reversing the number. By reversing … Continue reading “C Program to Check Whether a Number is Palindrome”

C Program to Compute LCM of Multiple Integers

In mathematics, Least Common Multiple or Lowest Common Multiple (LCM) of two integers is the lowest possible positive integer that is divisible by both the integers. We’ll first see how to write C program to compute LCM of two integers. Then we’ll extend that logic for multiple integers. APPROACH 1: LCM Using GCD We can … Continue reading “C Program to Compute LCM of Multiple Integers”

Implement Binary Search in C

Binary search is an efficient searching technique that is used to search a key in a sorted array. In every iteration, searching scope is reduced to half. That’s why it is called Binary Search or Half Interval search. Binary Search Algorithm If the middle element of the sub-array is equal to the key, then the … Continue reading “Implement Binary Search in C”

3
0
0
0
7
0