Print missing and duplicate numbers in the given sequence of numbers.

Given a range of natural numbers where some numbers are repeated and some are missing in the range. Our aim is to find missing numbers and repeated numbers. Let us discuss the problem with an example. So for the input {2, 3, 3, 5, 5, 8, 2} our output should be as follows. This problemRead More »


Trie Data Structure

Trie data structures are useful to process and search in large character data sets. It takes only orders of word length to search a word in length file or a million words dictionary. Some examples where Trie’s use. In finding words in large files. In finding any word in the large dictionary of words. InRead More »

Clone given Graph

Given a graph with an adjacency list, we aim to clone the complete graph with edges. Cloning does creates a new memory for similar data. Let us understand this with a three-node example graph. We can solve this problem using either DFS or BFS. Let’s solve this problem using DFS. Our Graph object contains theRead More »