All Questions
50 questions
2
votes
2
answers
129
views
A thread-safe performant Money Transfer API in Java
This is a popular interview question. It is meant to be done within 30 minutes. The task is to implement a thread-safe performant Bank Account API that allows to transfer, deposit, withdraw and check ...
1
vote
0
answers
80
views
A parallel MSD radix sort in Java for integer keys
I have this repository: https://github.com/coderodde/ParallelRadixSort.java/tree/main
It contains a parallel MSD radix sort presented below:
...
4
votes
2
answers
308
views
Multiplayer queue optimisation
I currently have code that is working but I think it can be optimised.
The code waits until a player joins and adds the player to a BlockingQueue if there is
not already a Player waiting then it ...
0
votes
3
answers
1k
views
Fastest way to create random pixel image
I want to create a very big gigantic PNG image. The image pixel are generated randomly, being
How can I improve the below code to create a fast random pixel image in java?
...
2
votes
3
answers
116
views
Java file analyzer byte-by-byte
This is part of this topic.
Problem:
I need to read a file with BigIntegers and make some analysis "on-the-fly" with each read number (get prime numbers count, get armstrong numbers count). Right now ...
2
votes
1
answer
542
views
Producer consumer design and implementation using Java 8
Please review my design and code implementation and suggest if any optimisation is possible in terms of performance (time complexity / space complexity ) or any better way of design or implementation. ...
3
votes
1
answer
2k
views
Matchmaking for a multiplayer game
I have working code that needs some optimization for scalability and overall performance. This code basically creates a lobby where users wait for match to be created and link users for a multiplayer ...
4
votes
2
answers
11k
views
FFMPEG with Java Wrapper
In this java application, I am trying to convert an video into small clips.
Here is the implementation class for the same
...
3
votes
0
answers
4k
views
Matrix multiplication project using multithreading in java
Below is my code of matrix multiplication in Java. It has both implementation of matrix multiplication- one without multi-threading and another one using multi-threading.
For multi-threading ...
3
votes
1
answer
393
views
Port Availability Scanner, written in Java (9)
For purpose of practice and experience, I was working on a "Port Availability Scanner" written in Java. So far it's working but it's really slow. Especially on relatively large quantities of ports (...
1
vote
1
answer
57
views
Combining multiple files using a single server in Java
I have ~50 files, each file contains records that look like the following:
...
3
votes
1
answer
13k
views
Processing files in directories with multithreading
I am processing files in directories. I want to use multi-threading in two ways:
10 threads to process files/folders concurrently
10 threads to process all lines in each file concurrently
In this code,...
5
votes
3
answers
2k
views
Brute-force Vigenere Cipher using multiple threads
I'm trying to brute force a Vigenere Cipher knowing only that the key length is 5+ characters and that the decrypted text has the word ...
3
votes
2
answers
1k
views
Counting multiples of 3 or 5 using threads
I have a modified version of the first Project Euler problem — where I find the sum of all the numbers below the value 2100000000 that are multiples of 3 or 5 using a multi-threaded program.
The ...
12
votes
2
answers
10k
views
Efficiently using Apache HttpClient in multithreaded environment
I have a library which is being used by customers and they are passing DataRequest object which has userid, various ...