Problem I’m currently attempting to learn some basic JVM optimization techniques using JMH. I created the following bench to compare […]
Tag: java
Dijkstra’s algorithm using priority queue running slower than without PQ
Problem I need to implement dijkstra’s algorithm and I’ve done so using this Wikipedia page. I’ve done it both with […]
Merit of a “Search” class similar to a “Builder” class
Problem I have a class something like the following: class ItemManager { List<Item> items; public ItemManager() { items = Database.retrieveItems(); […]
LeetCode Problem 66 : Plus One
Problem I have started practicing problems in leetcode and I solved the following problem on LeetCode. The challenge is : […]
Attempting to make my properties an enum based singleton
Problem I was attempting to implement my first singleton using an enum, was a bit of a struggle for me […]
Simple audio playback system
Problem I am trying to optimize my game written in Java and I used the VisualVM launcher for profiling and […]
Multiplying Lists
Problem Challenge: Given 2 lists of positive integers. Write a program which multiplies corresponding elements in these lists Specifications: Your […]
Automated Java fighting and battling simulation
Problem This is my second post since I’ve started coding/joined this site so be ready for some bad code and […]
Using BufferedReader to read lines of a file into a list
Problem To help improve my proficiency with Java, I would like to know how should I close these FileReaders as […]
Java OOP Hangman
Problem Last time we posted here we were overwhelmed by the useful feedback. We’ve had another go at OOP/programming – […]