Welcome To Tutorialspoint.dev
Officially launched 18th May 2019

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

# 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&#x2019;t know anyone in the party. We can...

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

# 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 &#x201C;PRAC...

# Activity Selection Problem Greedy Algo-1

Greedy is an algorithmic paradigm that builds up a solution piece by piece, always choosing the next piece that offers the most obvious and immediate benefit. Greedy...

# Rat in a Maze Backtracking-2

We have discussed Backtracking and Knight&#x2019;s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracki...

# Sudoku Backtracking-7

Given a partially filled 9&#xD7;9 2D array &#x2018;grid[9][9]&#x2019;, the goal is to assign digits (from 1 to 9) to the empty cells so that every row, column, and s...

# Find the first non-repeating character from a stream of characters

Given a stream of characters, find the first non-repeating character from stream. You need to tell the first non-repeating character in O(1) time at any moment. If we...

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

# Sliding Window Maximum (Maximum of all subarrays of size k)

Given an array and an integer k, find the maximum for each and every contiguous subarray of size k. Examples : Input : arr[] = {1, 2, 3, 1, 4, 5, 2, 3, 6} k = 3 Outp...