## Implement Trie Data Structure in Java

Trie is a tree-based data structure used for efficient retrieval of a key in a huge set of strings. In this post, we will implement Trie data structure in Java.

Coding made easy

Trie is a tree-based data structure used for efficient retrieval of a key in a huge set of strings. In this post, we will implement Trie data structure in Java.

The longest increasing subsequence problem is to find a subsequence of a given sequence in which the subsequence’s elements are in sorted order, lowest to highest, and in which the subsequence is as long as possible. This subsequence is not necessarily contiguous, or unique.

In this post, we will discuss about std::prev_permutation which can be used to find the lexicographically smaller permutations of a string.

Given a set of intervals, print all non-overlapping intervals after merging overlapping intervals.

Given an circular array of integers, find subarray in it which has the largest sum.

Given an array of integers, find contiguous subarray within it which has the largest sum.

In this post, we will discuss about std::next_permutation which can be used to find the lexicographically greater permutations of a string.

Given an array of integers containing duplicates, return the majority element in an array if present. A majority element appears more than n/2 times where n is the size of the array.

Given a binary tree, write iterative and recursive solution to traverse the tree using in-order traversal in C++ and Java. Unlike linked lists, one-dimensional arrays and other linear data structures, which are traversed in linear order, trees may be traversed in multiple ways in depth-first order (pre-order, in-order, and post-order) or breadth-first order (level …

Given a binary tree, write iterative and recursive solution to traverse the tree using pre-order traversal in C++ and Java. Unlike linked lists, one-dimensional arrays and other linear data structures, which are traversed in linear order, trees may be traversed in multiple ways in depth-first order (pre-order, in-order, and post-order) or breadth-first order …

Given a binary tree, write iterative and recursive solution to traverse the tree using post-order traversal in C++ and Java. Unlike linked lists, one-dimensional arrays and other linear data structures, which are traversed in linear order, trees may be traversed in multiple ways in depth-first order (pre-order, in-order, and post-order) or breadth-first order …

Given a binary tree, print its nodes level by level. i.e. all nodes present at level 1 should be printed first followed by nodes of level 2 and so on.. All nodes for any level should be printed from left to right.