Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
DSA
22.5K+ articles
Mathematical
7.8K+ articles
Arrays
6.5K+ articles
Strings
3.2K+ articles
Amazon
1.8K+ articles
Searching
1.7K+ articles
Microsoft
797+ articles
Binary Search Tree
290+ articles
Heap
279+ articles
Order-Statistics
65+ articles
array-stream
17 posts
Recent Articles
Popular Articles
C++ Program to Find the K'th largest element in a stream
Last Updated: 25 October 2022
Given an infinite stream of integers, find the k'th largest element at any point of time.Example:Input:stream[] = {10, 20, 11, 70, 50, 40, 100, 5, ...}k = 3Output: {_, _...
read more
Arrays
Order-Statistics
Amazon
Cisco
Searching
Heap
Binary Search Tree
C++
C++ Programs
array-stream
DSA
Java Program to Find the K'th largest element in a stream
Last Updated: 17 August 2023
Given an infinite stream of integers, find the k'th largest element at any point of time.Example:Input:stream[] = {10, 20, 11, 70, 50, 40, 100, 5, ...}k = 3Output: {_, ...
read more
Arrays
Order-Statistics
Amazon
Cisco
Java
Searching
Heap
Binary Search Tree
Java Programs
array-stream
DSA
Median of Stream of Running Integers using STL | Set 2
Last Updated: 17 March 2023
Given an array arr[] of size N representing integers required to be read as a data stream, the task is to calculate and print the median after reading every integer.Exampl...
read more
Arrays
Queue
Sorting
Mathematical
STL
array-stream
median-finding
DSA
Sort a stream of integers
Last Updated: 11 November 2022
Given an array, arr[] of size N whose elements from left to right, must be read as an incoming stream of integers, the task is to sort the stream of integers and print acc...
read more
Arrays
Binary Search
Searching
Sorting
Binary Search Tree
Competitive Programming
array-stream
DSA
Mode in a stream of integers (running integers)
Last Updated: 19 January 2023
Given that integers are being read from a data stream. Find the mode of all the elements read so far starting from the first integer till the last integer.Mode is defined ...
read more
Arrays
Mathematical
array-stream
Java-HashMap
frequency-counting
DSA
Rank of all elements in a Stream in descending order when they arrive
Last Updated: 02 January 2023
Given a stream of numbers as arr, the task is to find the rank of each element in the stream in descending order when they arrive.Rank is defined as the total number of el...
read more
Arrays
Searching
Sorting
array-stream
DSA
Streams on Arrays in Java 8
Last Updated: 16 September 2022
In this article, we would be going through stream method of Arrays class which is added in Java 8, it simplifies many operations on arrays as well have improved the effici...
read more
Java
array-stream
java-stream
Java-Array-Programs
Find top k (or most frequent) numbers in a stream
Last Updated: 03 January 2023
Given an array of n numbers. Your task is to read numbers from the array and keep at-most K numbers at the top (According to their decreasing frequency) every time a new n...
read more
Arrays
Order-Statistics
Amazon
Accolite
Hash
array-stream
cpp-unordered_map
DSA
Queue based approach for first non-repeating character in a stream
Last Updated: 10 January 2023
Given a stream of characters and we have to find first non repeating character each time a character is inserted to the stream.Examples:Input : a a b cOutput : a -1 b bIn...
read more
Strings
Linked List
Microsoft
Amazon
Yahoo
Flipkart
Payu
Queue
Hash
array-stream
DSA
Largest triplet product in a stream
Last Updated: 14 February 2025
Given a stream of integers represented as arr[]. For each index i from 0 to n-1, print the multiplication of the largest, second largest, and third largest element of the ...
read more
Arrays
Heap
array-stream
DSA
Check divisibility in a binary stream
Last Updated: 23 November 2023
Stream of binary number is coming, the task is to tell the number formed so far is divisible by a given number n. At any given time, you will get 0 or 1 and tell whether t...
read more
Bit Magic
divisibility
array-stream
DSA
K'th largest element in a stream
Last Updated: 11 May 2025
Given an input stream of n integers, represented as an array arr[], and an integer k. After each insertion of an element into the stream, you need to determine the kth lar...
read more
Arrays
Order-Statistics
Amazon
Cisco
Searching
Heap
Binary Search Tree
array-stream
DSA
Online algorithm for checking palindrome in a stream
Last Updated: 11 February 2025
Given a stream of characters (characters are received one by one), write a function that prints 'Yes' if a character makes the complete string palindrome, else prints 'No'...
read more
Strings
Pattern Searching
palindrome
array-stream
DSA
First non-repeating character in a stream
Last Updated: 25 March 2025
Given an input stream s consisting solely of lowercase letters, you are required to identify which character has appeared only once in the stream up to each point. If ther...
read more
Strings
Linked List
Microsoft
Amazon
Yahoo
Flipkart
Payu
FactSet
Queue
Hash
Python
array-stream
DSA
Select a random number from stream, with O(1) space
Last Updated: 20 April 2023
Given a stream of numbers, generate a random number from the stream. You are allowed to use only O(1) space and the input is in the form of a stream, so can't store the pr...
read more
Random Algorithms
Mathematical
Randomized
array-stream
DSA
1
2
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !