Given a directed graph, check if it is strongly connected or not. A directed graphs is said to be strongly connected if every vertex is reachable from every other vertex.
Find all N-digit strictly increasing numbers where N varies from [1 to 9]. If we process the number from left to right and for every pair of adjacent digits, if every digit is greater than the preceding digit, we can say that the digits are strictly increasing.
Given a binary tree, write an efficient algorithm to check if tree is height balanced or not. In a height balanced tree, the absolute difference between height of left subtree and right subtree for every node is 0 or 1.
Given an array of integers, find and print contiguous subarray with maximum sum in it.
Write an efficient program to convert number to words.
In this post, we will discuss how to dynamically allocate memory for multi-dimensional array in C++. Single Dimensional Array 2-Dimensional Array 3-Dimensional Array
In this post, we will discuss various methods to dynamically allocate memory for 3D array in C using Single Pointer and Triple Pointer.
Given an array of integers, check if array contains a sub-array having 0 sum.
Given a positive number N, find all combinations of 2*N elements such that every element from 1 to N appears exactly twice and distance between its two appearances is exactly equal to value of the element.
Write an efficient function to implement substr function in C. substr() function returns the substring of given string between two given indexes.
Write an efficient function to implement strstr function in C. strstr() function returns a pointer to the first occurrence of a string in another string.
Write an efficient function to implement strcmp function in C. Standard strcmp() function compares the two strings and returns an integer indicating the relationship between the two strings.