Level order traversal of a binary tree
Given a binary tree, print its nodes level by level, i.e., print all nodes of level 1 first, followed by nodes of level 2 and so on… Print nodes for any level from left to right.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedGiven a binary tree, print its nodes level by level, i.e., print all nodes of level 1 first, followed by nodes of level 2 and so on… Print nodes for any level from left to right.
This post will detect cycles in a linked list using hashing and Floyd’s cycle detection algorithm.
This post will reverse the linked list using recursion in C, C++, Java, and Python.
In this post, we will see how to reverse the linked list iteratively without using recursion.
This post will discuss various methods to implement a linked list by inserting it at the tail of the singly linked list.
This post will discuss various linked list implementation techniques in detail and construct a singly linked list in the C programming language.
A linked list is a linear data structure consisting of a group of nodes where each node point to the next node through a pointer. Each node is composed of data and a reference (in other words, a link) to the next node in the sequence.
This post will find all permutations of a string containing all distinct characters in C++. For example, the string ABC has 6 permutations, i.e., ABC, ACB, BAC, BCA, CBA, CAB.
Run–length encoding (RLE) is a simple form of lossless data compression that runs on sequences with the same value occurring many consecutive times. It encodes the sequence to store only a single value and its count.
Given a text, find all occurrences of a given pattern in it. The goal is to find all occurrences of pattern P[1…m] of length m in the given text T[1…n] of length n.
Given a sorted array of n integers and a target value, determine if the target exists in the array or not in logarithmic time using the binary search algorithm. If target exists in the array, print the index of it.
Flood fill (also known as seed fill) is an algorithm that determines the area connected to a given node in a multi-dimensional array.