# Category: Algorithms

#### Search an element in a sorted and rotated array

An element in a sorted array can be found in O(log n) time via binary search. But suppose we rotate an…

#### Program to cyclically rotate an array by one

Given an array, cyclically rotate the array clockwise by one.  Examples: Input: arr[] = {1, 2, 3, 4, 5} Output:…

#### Program to find the pair with a given sum in an array

We are given an array that is sorted and then rotated around an unknown point. Find if the array has…

#### C Program to implement Binary Search

We are given a sorted array of size n. We have to write program to find an element x in…

#### C Program to search an element in array

Write a C program to input elements in array and search whether an element exists in array or not. How…

#### C Program to delete an element from the array

In this Post we’re going to learn how to delete an element from the array in 2 conditions Position of…

#### Linear Search

Given an array of n elements. We have to write a function to search an item X in the given…

#### Tower of Hanoi Program in C

Tower of Hanoi is a mathematical puzzle where we have three towers and n disks. The objective of the puzzle…

#### Program to find Roots of a Quadratic Equation

In this post You’ll be learning how to write a program for finding out the roots of a quadratic equation…

#### Namespace and Scope in Python

Namespaces A namespace is a collection of currently defined symbolic names along with information about the object that each name…