Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Queue Recursion Stack

Level order traversal in spiral form

Write a function to print spiral order traversal of a tree. For below tree, function should print 1, 2, 3, 4, 5, 6, 7. Recommended: Please solve it on “PRAC...
Arrays Searching Adobe

Search an element in a sorted and rotated array

An element in a sorted array can be found in O(log n) time via binary search. But suppose we rotate an ascending order sorted array at some pivot unknown to you befo...
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 :...
Arrays Adobe Amazon

Nuts & Bolts Problem (Lock & Key problem) Set 1

Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping between nuts and bolts. Match nuts and bolts efficiently. Constrai...
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 :...
Advanced Data Structure Arrays Strings

How to design a tiny URL or URL shortener?

How to design a system that takes big URLs like “https://tutorialspoint.dev/slugresolver/count-sum-of-digits-in-numbers-from-1-to-n/” and converts them ...
Arrays Searching Adobe

Search an element in a sorted and rotated array

An element in a sorted array can be found in O(log n) time via binary search. But suppose we rotate an ascending order sorted array at some pivot unknown to you befo...
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. ...
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 :...
Tree Hike Reverse

Reverse alternate levels of a perfect binary tree

Given a Perfect Binary Tree, reverse the alternate level nodes of the binary tree. Given tree: a / b c ...

Subscribe to Our Newsletter