Skip to content

Instantly share code, notes, and snippets.

View anubhavbagri's full-sized avatar
🎯
Focusing

Anubhav Bagri anubhavbagri

🎯
Focusing
View GitHub Profile
@anubhavbagri
anubhavbagri / ParallelSearch.java
Last active May 13, 2021 14:55
A multithreaded java program where 4 threads are used to execute parallel search on large number of integers read from a text file and reduce the overall search time.
import java.util.*;
import java.io.IOException;
import java.nio.file.*;
import java.text.DecimalFormat;
import java.text.NumberFormat;
public class ParallelSearch implements Runnable {
private int startIndex, endIndex;
private static int nElements, key;