Skip to main content

All Questions

Tagged with
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 (...
coderodde's user avatar
  • 28.9k
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 ...
AutoTester999's user avatar
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. ...
coderodde's user avatar
  • 28.9k
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 ...
Giuseppe's user avatar
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: ...
coderodde's user avatar
  • 28.9k
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. ...
coderodde's user avatar
  • 28.9k
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: ...
coderodde's user avatar
  • 28.9k
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 -> ...
jpestana's user avatar
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 ...
Arjen's user avatar
  • 63
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 ...
Michael Ziluck's user avatar
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 ...
user200188's user avatar
0 votes
1 answer
107 views

java.util.Set extension/implementation

Lately, I was working on some experimental java.util.Set extension, IdSet: ...
Wojciech Karwacki's user avatar
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 ...
Curious's user avatar
  • 13
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 ...
nuxie's user avatar
  • 23
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 ...
cody.codes's user avatar
  • 1,935

15 30 50 per page