Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Mathematical SAP Labs SAP Labs

Check if a number is a power of another number

Given two positive numbers x and y, check if y is a power of x or not. Examples : Input: x = 10, y = 1 Output: True x^0 = 1 Input: x = 10, y = 1000 Output: True x^...
Arrays Sorting Adobe

Sort an array of 0s, 1s and 2s

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last. Examples: Input :...
Divide and Conquer Sorting Adobe

QuickSort

Like Merge Sort, QuickSort is a Divide and Conquer algorithm. It picks an element as pivot and partitions the given array around the picked pivot. There are many di...
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...
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 ...
Arrays Strings CBSE - Class 11

Write a program to reverse an array or string

Given an array (or string), the task is to reverse the array/string. Examples : Input : arr[] = {1, 2, 3} Output : arr[] = {3, 2, 1} Input : arr[] = {4, 5, 1, 2} ...
Arrays Dynamic Programming 24*7 Innovation Labs

Largest Sum Contiguous Subarray

Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum. ...
Dynamic Programming Mathematical Adobe

Minimum number of jumps to reach end

Given an array of integers where each element represents the max number of steps that can be made forward from that element. Write a function to return the minimum n...
Arrays Sorting Adobe

Sort an array of 0s, 1s and 2s

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last. Examples: Input :...
Graph Accolite Amazon

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....

Subscribe to Our Newsletter