C++ Programs - Hard Articles
Given an un-directed and unweighted connected graph, find a simple cycle in that graph (if it exists). Simple Cycle: A simple cycle is a cycle… Read More
Consider a situation where we have a set of intervals and we need the following operations to be implemented efficiently:  Add an intervalRemove an intervalGiven… Read More
Pre-requisite: Fractional Knapsack Problem Given two arrays weight[] and profit[] the weights and profit of N items, we need to put these items in a… Read More
Given a numeric string S representing a large number, the task is to form a Fibonacci Sequence of at least length 3 from the given… Read More
Given a decimal number as N, the task is to convert N into an equivalent irreducible fraction. An irreducible fraction is a fraction in which… Read More
Given a string str, the task is to convert the given string into the number without using any inbuilt function. Examples:  Input: str = “985632”… Read More
Prerequisites:  Diameter of a N-ary treePath between two nodes in a graph Given a N-ary tree with N nodes numbered from 0 to N-1 and… Read More
Given an undirected graph with V vertices and E edges, the task is to print all the independent sets and also find the maximal independent… Read More
Given a positive integer N, the task is to find the sum of divisors of all the numbers from 1 to N.Examples:  Input: N =… Read More
Given string str that represents a number. The task is to find all possible ways to split the given string such that each segment is… Read More
Given an integer N, the task is to find the N-th Fibonacci numbers.Examples:  Input: N = 3 Output: 2 Explanation: F(1) = 1, F(2) = 1 F(3) = F(1)… Read More
Given an unsorted array arr[] of N integers that are in Arithmetic Progression, the task is to print the missing element from the given series.… Read More
Given an array arr[], the task is to determine the number of elements of the array which are not divisible by any other element in… Read More
Time ComGiven three integers a, b, and c representing a linear equation of the form ax + by = c, the task is to find… Read More
Given an integer S and an array arr[], the task is to find the minimum number of elements whose sum is S, such that any… Read More