4
votes
Recursive palindrome check
As Toby points out, your use of String.substring() is very expensive. It creates a new String object for each call, and (...
- 1,472
4
votes
Accepted
2
votes
Accepted
Calculator (Java/Beginner)
For a beginner this isn't terrible, but unfortunatly from a OOP point of view it's structured quite badly.
First i'm going to concentrate on the Database class. (...
- 10.6k
2
votes
Recursive palindrome check
You are creating lots of strings. If you pass a view of the substring (i.e. pass a string reference and a pair of indices) into the recursive call, you will reduce your garbage creation to almost nil....
- 67.6k
1
vote
IPv4 filter in Java
The IPFilter class
The implementation appears to be simple. The IPFilter class includes methods for adding and removing IPv4 addresses from the filter, as well as methods for determining whether an ...
- 11
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
java × 10869performance × 1275
algorithm × 1268
beginner × 1029
object-oriented × 718
android × 698
strings × 637
programming-challenge × 633
array × 497
multithreading × 453
swing × 414
game × 408
interview-questions × 355
design-patterns × 301
tree × 282
linked-list × 263
sorting × 260
recursion × 219
spring × 216
unit-testing × 198
parsing × 176
homework × 175
concurrency × 174
comparative-review × 171
hash-map × 170