Implement a stack in JavaScript
This post will discuss how to implement stack data structure in JavaScript.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedThis post will discuss how to implement stack data structure in JavaScript.
This post will discuss various methods to iterate through a stack in Java.
This post will discuss various methods to iterate over Deque in Java. A Deque is a linear collection that supports insertion & removal at both ends.
Given an expression containing numeric operands with addition and subtraction operators, evaluate it. The expression may contain sub-expressions enclosed in opening and closing braces.
A string that may contain multiple consecutive instances of the same value is encoded to only store that value and its count. Given such an encoded sequence, decode it.
Given an integer array, find the previous smaller element for every array element. The previous smaller element of a number x is the first smaller number to the left of x in the array.
Given two binary trees, check whether the leaf traversals of both trees are the same or not.
Construct an expression tree from a given postfix notation and print the infix notation. The binary expression tree is a binary tree whose leaves are operands, such as constants or variable names, and the other nodes contain operators.
Given a level order representation of a complete binary search tree, print its elements in increasing order.
Given a circular integer array, find the next greater element for every element in it. The next greater element of an element x in the array is the first larger number to the next of x.
Given an integer array, find the next greater element for every array element. The next greater element of a number x is the first greater number to the right of x in the array.
Write an efficient algorithm to invert alternate levels of a perfect binary tree.