## Find the correct order of alphabets in a given dictionary of ancient origin

Given a dictionary of ancient origin where the words are arranged alphabetically, find the correct order of alphabets in the ancient language.

## Young Tableau | Insert, Search, Extract-Min, Delete, Replace

A M x N Young tableau is an M x N matrix such that the entries of each row are in sorted order from left to right and the entries of each column are in sorted order from top to bottom. Some of the entries of a Young tableau may be infinity, which indicates an …

## Weighted Interval Scheduling Problem

Given a list of jobs where each job has a start and finish time, and also has profit associated with it, find maximum profit subset of non-overlapping jobs.

## Box Stacking Problem

Given a set of rectangular 3D boxes, create a stack of boxes which is as tall as possible. A box can be placed on top of another box if the dimensions of the 2D base of the lower box are each strictly larger than those of the 2D base of the higher box. Multiple instances …

## Implementation of Treap Data Structure (Insert, Search and Delete)

In this post, we will implement Treap Data Structure and perform basic operations like insert, search and delete on it.

## Implement a Queue using Stack Data Structure

In this post, we will see how to implement a queue using stack data structure in C++ and Java. In other words, design a queue that supports enqueue and dequeue operations using standard push and pop operations of the stack.

## Determine negative-weight cycle in a graph

Given a directed weighted graph, report a negative-weight cycle in the graph if any. A negative-weight cycle is a cycle in graph whose edges sum to a negative value.

## Unbounded Binary Search

Given a monotonically increasing function f(x), find the value of x where f(x) becomes positive for the first time. In other words, find a positive integer x such that f(x-1), f(x-2),… are negative and f(x+1), f(x+2),… are positive.

## In-place vs out-of-place algorithms

All algorithms can be classified into in-place and out-of-place algorithms based on the amount of extra space used by them. In this quick article, we’ll explore the difference between the two.

## Kahn’s Topological Sort Algorithm

Given a directed acyclic graph (DAG), print it in Topological order using Kahn’s Topological Sort algorithm. If the DAG has more than one topological ordering, print any of them.

## Linked List Implementation in Java

We know that LinkedList class in Java is a doubly-linked list implementation of the List interface. This post provides an overview common techniques to manually implement a linked list in Java programming language.

## Find Cost of Shortest Path in DAG using one pass of Bellman-Ford

Given a directed acyclic graph (DAG) and a source vertex, find the cost of shortest path from source vertex to all other vertices present in the graph. If vertex can’t be reached from given source vertex, print its distance as infinity.