Linked List

A Linked List is a data structure in which the objects are arranged in a linear order. Unlike Arrays, you cannot access any element directly through its index.

Topological Sort [Hackerearth]

A Topological sort of a Directed-Acyclic graph G is a linear ordering of all its vertices such that if G contains an edge E (u, v), then u appears before v in the ordering. And if the graph is not acyclic, then no linear ordering is possible.

How to find if two Binary trees are mirror images?

Mirror images mean right and left child of the two trees are interchanged. Thus, left child of first tree is right child of second tree. Traverse the Tree 1 and Tree 2 in Inorder fashion and store the node values of each Tree 1 & Tree 2 in two different arrays.

Time & Space complexity [Cheat Sheet]

he efficiency of an algorithm can be measured by two parameters: Time Complexity also known as running time of an algorithm is the number of primitive operations executed on a particular input.
Space Complexity is the total (extra) memory space required by the program for its execution.