Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes

Java - Converting a skip list to the ASCII art

"Obviously" no pretty string formatting belongs in the SkipList data structure. That is just a big single responsiblity principle violation. The question ...
TorbenPutkonen's user avatar
6 votes

Java - Converting a skip list to the ASCII art

The automatically found imperfections in SkipList: unused import statement import java.util.Random;. equals should check the ...
Joop Eggen's user avatar
  • 3,526
3 votes

Duplicate words in a text

Avoid Side-effects while using Streams You seem to be using a Stream as if it was a loop by accumulating state outside the stream. The ...
Alexander Ivanchenko's user avatar
2 votes

Running multiple producer and single consumer in a multithread environment

If you don't need consumer to process Messages in the insertion order, or any particular order, you can simplify your code significantly. All you need is blocking dequeue, 2-sided queue; Java offer ...
Espinosa's user avatar
  • 121
2 votes

Printing longest sequence of zeroes

Optional abuse In the code you shared, Optional is used only to create a chain of method calls and avoid writing conditional ...
Alexander Ivanchenko's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible