Implement insert, search and delete operations on Trie Data structure. Assume that input consist of lowercase letters a-z.
Explain the working of disjoint-set data structure and efficiently implement it. Problem: We have some number of items. We are allowed to merge any two items to consider them equal. At any point, we are allowed to ask whether two items are considered equal or not.
Depth first search (DFS) is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking.
Breadth first search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’) and explores the neighbor nodes first, before moving to the next level neighbors.
Write a recursive program to efficiently reverse a given string in C, C++ and Java.
In this post, we will see how to list all files in a directory and all its sub-directories in Java with Guava and Apache Commons IO library.