Iterative Implementation of Quicksort
Write an iterative version of the recursive Quicksort algorithm.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedWrite an iterative version of the recursive Quicksort algorithm.
A stack is a linear data structure that follows the LIFO (Last–In, First–Out) principle. That means the objects can be inserted or removed only at one end of it, also called a top.
In this article, we will discuss the C++ implementation of the stack data structure using classes and make code generic for all data types by using C++ templates.
Write code to evaluate a given postfix expression efficiently. For example, 82/ will evaluate to 4 (8/2), 138×+ will evaluate to 25 (1+8×3) and 545×+5/ will evaluate to 5 ((5+4×5)/5).
Given a balanced expression that can contain opening and closing parenthesis, check if the expression contains any duplicate parenthesis or not.
Given a string containing opening and closing braces, check if it represents a balanced expression or not.
In this article, C++ implementation of stack data structure is discussed using a class. A stack is a linear data structure that serves as a container of objects that are inserted and removed according to the LIFO (Last–In, First–Out) rule.
In this post, linked list implementation of stack is covered. A stack is a linear data structure that serves as a collection of elements, with three main operations: push, pop, and peek.
This articles covers stack implementation in C. A stack is a linear data structure that serves as a collection of elements, with three main operations: push, pop and peek.
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 for a graph) and explore as far as possible along each branch before backtracking.
Write an iterative program to reverse a string in C++ and Java.