Depth first search (DFS) vs Breadth first search (BFS)
In this post, we will see the difference between Depth first search (DFS) and Breadth first search (BFS) algorithm which are used to traverse/search tree or graph data structure.
Coding made easy
In this post, we will see the difference between Depth first search (DFS) and Breadth first search (BFS) algorithm which are used to traverse/search tree or graph data structure.
Implement Quick sort algorithm using Hoare’s Partitioning scheme.
Given a collection of n items, each of which has a non-negative integer key whose maximum value is at most k, effectively sort it using counting sort algorithm.
In this post, we will implement KMP Algorithm in C, C++ and Java programming language.
Given an array of integers, find contiguous subarray within it which has the largest sum.
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.
In this post, we will see how to detect cycle in a a linked list using Hashing and Floyd’s Cycle Detection Algorithm.
In this post, we will see how to reverse linked list using recursion in C and C++.
In this post, we will see how to reverse linked list iteratively without using recursion.