## Largest Divisor for each element in an array other than 1 and the number itself

Given an array arr[] of N integers, the task is to find the largest divisor for each element in an array other than 1 and… Read More »

## Frequency of an integer in the given array using Divide and Conquer

Given an unsorted array arr[] and an integer K, the task is to count the occurrences of K in the given array using Divide and… Read More »

## Given a number N in decimal base, find the sum of digits in any base B

Given a number N in decimal base, the task is to find the sum of digits of the number in any base B. Examples: Input:… Read More »

## Find the Nth digit from right in base B of the given number in Decimal base

Given a number A in decimal base, the task is to find the Nth digit from last in base B Examples: Input: A = 100,… Read More »

## Program to build a DFA to accept strings that start and end with same character

Given a string consisting of characters a and b, check if the string starts and ends with the same character or not. If it does,… Read More »

## Find Nth term of the series 2, 3, 10, 15, 26….

Given a number N, the task is to find the Nth term in series 2, 3, 10, 15, 26…. Example: Input: N = 2 Output:… Read More »

## Find the Nth term in series 12, 35, 81, 173, 357, …

Given a number N, the task is to find the Nth term in series 12, 35, 81, 173, 357, … Example: Input: N = 2… Read More »

## Find Nth term of the series 4, 2, 2, 3, 6, …

Given a number N, the task is to find the N-th term in series 4, 2, 2, 3, 6, … Example: Input: N = 2… Read More »

## Median of an unsorted array using Quick Select Algorithm

Given an unsorted array arr[] of length N, the task is to find the median of of this array. Median of a sorted array of… Read More »

## Program to build a DFA that accepts strings starting and ending with different character

Prerequisite: Deterministic Finite Automata Given a string str consists of characters ‘a’ & ‘b’. The task is to check whether string str starts and ends… Read More »

## Program to print the given digit in words

Given a number N, the task is to convert every digit of the number into words. Examples: Input: N = 1234 Output: One Two Three… Read More »

## Number of subsequences with negative product

Given an array arr[] of N integers, the task is to find the count of all the subsequences of the array that have a negative… Read More »

## Ternary representation of Cantor set

Given three integers A, B and L, the task is to print the ternary cantor set from range [A, B] upto L levels. Ternary Cantor… Read More »

## Array of Vectors in C++ STL

Prerequisite: Arrays in C++, Vector in C++ STL An array is a collection of items stored at contiguous memory locations. It is to store multiple… Read More »

## Minimum number of Circular obstacles required to obstruct the path in a Grid

Consider a grid of dimensions NxM and an array R consisting of available circular obstacles, the task is to find the minimum number of circular… Read More »