Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Arrays Backtracking Hash

Given an array A[] and a number x, check for pair in A[] with sum as x

Write a program that, given an array A[] of n numbers and another number x, determines whether or not there exist two elements in S whose sum is exactly x. ...
Arrays Searching Amazon

Two elements whose sum is closest to zero

Question: An Array of integers is given, both +ve and -ve. You need to find the two elements such that their sum is closest to zero. For the below array, program shou...
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...
Searching Sorting Amazon

Find a pair with the given difference

Given an unsorted array and a number n, find if there exists a pair of elements in the array whose difference is n. Examples: Input: arr[] = {5, 20, 3, 2, 50, 80}, n...
Arrays Amazon Amazon

Replace every element with the greatest element on right side

Given an array of integers, replace every element with the next greatest element (greatest element on the right side) in the array. Since there is no element next to...
Arrays Amazon Amazon

Find the maximum repeating number in O(n) time and O(1) extra space

Given an array of size n, the array contains numbers in range from 0 to k-1 where k is a positive integer and k <= n. Find the maximum repeating number in this arr...
Matrix Stack Amazon

The Celebrity Problem

In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesn’t know anyone in the party. We can...
Strings Amazon cpp-pair

Given a string, find its first non-repeating character

Given a string, find the first non-repeating character in it. For example, if the input string is “GeeksforGeeks”, then output should be ‘f&#x2...
Linked List Accolite Amazon

Write a function to get the intersection point of two Linked Lists.

There are two singly linked lists in a system. By some programming error, the end node of one of the linked list got linked to the second list, forming an inverted Y...
Arrays Linked List Accolite

Add two numbers represented by linked lists Set 2

Given two numbers represented by two linked lists, write a function that returns sum list. The sum list is linked list representation of addition of two input numbers...

Subscribe to Our Newsletter