## Odd Even Transposition Sort / Brick Sort using pthreads

Odd-Even Transposition Sort is a parallel sorting algorithm. It is based on the Bubble Sort technique, which compares every 2 consecutive numbers in the array… Read More »

Odd-Even Transposition Sort is a parallel sorting algorithm. It is based on the Bubble Sort technique, which compares every 2 consecutive numbers in the array… Read More »

Prerequisite: C signal handling, IPC through shared memory A signal is used in the UNIX system to notify a process that a particular event has… Read More »

Thread::hardware_concurrency is an in-built function in C++ std::thread. It is an observer function which means it observes a state and then returns the corresponding output.… Read More »

Thread::joinable is an in-built function in C++ std::thread. It is an observer function which means it observes a state and then returns the corresponding output… Read More »

The problem is to synchronize n number of threads using pthread library. The idea is take thread count and print 1 in first thread, print… Read More »

Given a 2-D matrix, find the element having maximum value using multi-threading. Prerequisite : Multithreading Examples : Input : {{1, 5, 3, 6}, {22, 10,… Read More »

What are conditional wait and signal in multi-threading ? Explanation : When you want to sleep a thread, condition variable can be used. In C… Read More »

Given a matrix of N x N, task is to find the determinant of the matrix using multi-threading. Examples : Input : mat = {{0,… Read More »

Print 1 2 3 infinitely using thread. Create three threads viz T1, T2, and T3 such that those should print 1 2 3 sequence infinitely.… Read More »

Share a queue among three threads A, B, C as per given norms : Thread A generates random integers and pushes them into a shared… Read More »

Given very large array of integers, find maximum within the array using multhreading. Examples: Input : 1, 5, 7, 10, 12, 14, 15, 18, 20,… Read More »

Given a large file of integers, search for a particular element in it using multi-threading. Examples: Input : 1, 5, 7, 10, 12, 14, 15,… Read More »

Multithreading support was introduced in C+11. Prior to C++11, we had to use POSIX threads or p threads library in C. While this library did… Read More »

Sum of array is a small problem where we have to add each element in the array by traversing through the entire array. But when… Read More »

Merge Sort is a popular sorting technique which divides an array or list into two halves and then start merging them when sufficient depth is… Read More »