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.

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.

Given an array of integers, sort it using introsort sorting algorithm. Introsort is an efficient in-place sorting algorithm, which usually beats all other sorting algorithms in terms of performance. Due to its high performance, it is used in a number of standard library sort functions, including some C++ sort implementations. Introsort is a comparison …