Given very large array of integers, find maximum within the array using multhreading.
Input : 1, 5, 7, 10, 12, 14, 15, 18, 20, 22, 25, 27, 30, 64, 110, 220 Output :Maximun Element is : 220 Input : 10, 50, 70, 100, 120, 140, 150, 180, 200, 220, 250, 270, 300, 640, 110, 220 Output : Maximun Element is : 640
Prerequisite : Multithreading
Note : Useful in large files of size MB/GB.
How to run :
It can only be run on linux envirenment.
>> gcc -pthread maximum.c >> ./a.out
Maximun Element is : 300
- Sum of an array using pthreads
- Sum and Product of minimum and maximum element of an Array
- Find the maximum element in an array which is first increasing and then decreasing
- Program to find the minimum (or maximum) element of an array
- Leftmost and rightmost indices of the maximum and the minimum element of an array
- Closest greater element for every array element from another array
- Find maximum element of each row in a matrix
- For each element in 1st array count elements less than or equal to it in 2nd array
- Maximum in an array that can make another array sorted
- Ceiling of every element in same array
- Floor of every element in same array
- Least frequent element in an array
- Most frequent element in an array
- Last duplicate element in a sorted array
- Remove exactly one element from the array such that max - min is minimum
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.