Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Graph Accolite Amazon

Kahn’s algorithm for Topological Sorting

Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. T...
Arrays Graph Mathematical

Print all Jumping Numbers smaller than or equal to a given value

A number is called as a Jumping Number if all adjacent digits in it differ by 1. The difference between ‘9’ and ‘0’ is not considered as 1...
Hash Linked List Sorting

Union and Intersection of two linked lists Set-3 (Hashing)

Given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. Order of elements in outpu...
Arrays Heap Searching

K’th Smallest/Largest Element in Unsorted Array Set 1

Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array. It is given that ll array ...
Heap Adobe Amazon

Median of Stream of Running Integers using STL

Given that integers are being read from a data stream. Find median of all the elements read so far starting from the first integer till the last integer. This is also...
Heap Sorting 24*7 Innovation Labs

HeapSort

Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the maximum element and pl...
Heap Mathematical Adobe

Median in a stream of integers (running integers)

Given that integers are read from a data stream. Find median of elements read so for in efficient way. For simplicity assume there are no duplicates. For example, let...
Linked List Amazon Microsoft

Pairwise swap elements of a given linked list

Given a singly linked list, write a function to swap elements pairwise. For example, if the linked list is 1->2->3->4->5 then the function should change ...
Arrays Matrix Searching

Find the row with maximum number of 1s

Given a boolean 2D array, where each row is sorted. Find the row with the maximum number of 1s. Example: Input matrix 0 1 1 1 0 0 1 1 1 1 1 1 // this row has maximum...
Arrays Stack 24*7 Innovation Labs

Implement two stacks in an array

Create a data structure twoStacks that represents two stacks. Implementation of twoStacks should use only one array, i.e., both stacks should use the same array for s...

Subscribe to Our Newsletter