All Questions
46
questions
1
vote
1
answer
82
views
Rewriting the java.util.concurrent.ConcurrentSkipListMap to a version without concurrency constructs
I have essentially rewrote the java.util.concurrent.ConcurrentSkipListMap into a version without concurrency constructs (...
2
votes
4
answers
178
views
Comparison of two excel files ignoring line order
Below is a simple method which compares contents of two excel files ignoring the line order.
This method is working as expected.
But, one of my peers in their code review mentioned that initializing ...
3
votes
3
answers
155
views
IPv4 filter in Java
I have a simple class for representing IPv4-addresses via int values, and a simple IP-address filter that works like a set of IPv4-addresses.
...
2
votes
2
answers
148
views
Radio with channels
Realize the Radio and Channel classes that represent radio and a radio station. The radio class offers an argumentless constructor and the following methods:
addChannel: stores and returns a new ...
1
vote
1
answer
90
views
A simple Java integer integer hash set - follow-up 2
(See the previous version.)
Now I have this:
com.github.coderodde.util.IntHashSet:
...
1
vote
0
answers
79
views
A simple Java integer hash set - follow-up
(See the previous version.)
(See the next version.)
After incorporating changes in the previous post, I came up with this implementation. However, I left hashing as it is.
...
6
votes
4
answers
1k
views
A simple Java integer hash set
(See the next version.)
The following data structure implements a hash table based set for int values:
...
3
votes
1
answer
355
views
Take element of a Set collection depending on the value of another element
I had to populate the fields of a Service object using a Set (HashSet) with any configuration parameters -> ...
6
votes
1
answer
430
views
Remove elements compared with other elements in a Set based on a condition
Simplified the actual problem to focus on comparing/removing performance.
Given a set S with n elements , find the most optimal way to compare each element to all others until a condition is met that ...
4
votes
2
answers
115
views
Ensure difference between sets
An endpoint that my application interacts with allows you to specify which fields are returned in the JSON result. My application will then map the JSON to a POJO using Jackson. Quite often I add more ...
4
votes
2
answers
1k
views
Custom Hashset in Java
I have written this custom hashset and though it isn't completed yet, I would like to know if there is anything I am overlooking in terms of clean code conventions. My aim was also to apply generics ...
0
votes
1
answer
107
views
java.util.Set extension/implementation
Lately, I was working on some experimental java.util.Set extension, IdSet:
...
1
vote
1
answer
3k
views
All subsets of a String in java using recursion
I wrote this code for printing all sets of a String. It also prints the empty subset. Is this the right approach
...
2
votes
1
answer
1k
views
set implementation based on an array
I was supposed to implement set without using any implemented structures. I would love to know what can I correct in my code, because I am not that much satisfied with its quality, so if you have any ...
1
vote
3
answers
3k
views
Finding common Integers between two lists
Write a method numInCommon that takes two Lists of integers as
parameters and returns the number of unique integers that occur in
both lists. Use one or more Sets as storage to help you solve this
...