C++ Programs - Hard Articles
What is the Determinant of a Matrix? The determinant of a Matrix is a special number that is defined only for square matrices (matrices that have… Read More
Given an array, the task is to copy these array elements into another array in reverse array.Examples:  Input: array: 1 2 3 4 5 Output:… Read More
Given an array, write functions to find the minimum and maximum elements in it.  Example: C++ // C++ program to find minimum (or maximum) element … Read More
Given two binary strings, return their sum (also a binary string).Example: Input: a = "11", b = "1" Output: "100" We strongly recommend you to… Read More
Given a matrix, clockwise rotate elements in it. Examples: Input: 1 2 3 4 5 6 7 8 9 Output: 4 1 2 7 5… Read More
As we are given two paths of two files, we have to compare these two paths and check whether they are equal or greater or… Read More
Given two arrays arr1[] and arr2[] of length N and M respectively, the task is to check if the two arrays are equal or not. … Read More
In C++ a 3-dimensional array can be implemented in two ways: Using array (static)Using vector (dynamic) Passing a static 3D array in a function: Using… Read More
Given a matrix of size N*M, and a number K. We have to rotate the matrix K times to the right side. Examples:   Input : N… Read More
The Checksum is an error detection method that detected errors in data/message while it is transmitted from sender to receiver. This method is used by… Read More
Given two sorted arrays A[] and B[] consisting of N and M integers respectively, the task is to find the Kth smallest number in the… Read More
Given a linked list, write a function to reverse every alternate k nodes (where k is an input to the function) in an efficient way.… Read More
Given a positive integer K and a weighted undirected connected graph of N nodes and E edges as an array Edges[] of the type {u,… Read More
In C++, we can make operators to work for user-defined classes. This means C++ has the ability to provide the operators with a special meaning… Read More
A Set is a collection of distinct elements. Elements cannot be modified once added. There are various operations associated with sets such as union, intersection,… Read More
HTML Parser is a program/software by which useful statements can be extracted, leaving html tags (like <h1>, <span>, <p> etc) behind.  Examples: Input: <h1>Geeks for… Read More
Given a directed and weighted graph of N nodes and M edges, the task is to find the 1st to Kth shortest path lengths from… Read More
Files play an important role in programming. It allows storage of data permanently. The C++ language provides a mechanism to store the output of a… Read More
Given a binary string S of size N, the task is to check if the binary string S can be sorted in decreasing order by… Read More
The Binary Exponential Backoff Algorithm prevents packet collisions during simultaneous access by randomizing moments at stations attempting to access the wireless channels. However, this randomization… Read More