Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
3k views

Java n-ary Tree class with custom made methods and nested Node class

I'm a beginner and I wrote this (working) code for n-ary tree. The specifics: Each node is to be built with an integer value. Each node has a variable number of children. The nodes should have an ...
Ary's user avatar
  • 41
2 votes
2 answers
664 views

Print binary tree level by level

Please critique: ...
fluffychaos's user avatar
7 votes
2 answers
4k views

Finding the weight of the heaviest path in a binary tree

I'm fairly new to Java, arriving in the "future" from C and returning to type safety from Python. I've programmed an algorithm to return the weight of the heaviest path from the root of a binary tree ...
doughgle's user avatar
  • 629
5 votes
3 answers
35k views

Inserting a node in Binary Search Tree

I would like any suggestions and improvements for this code, be it generics or my Node class being completely mutable. Should I make it mutable? Is it good? Why? <...
Ishan Soni's user avatar
10 votes
1 answer
197 views

Good performance when predicting future game states

This question is about my answer to this king-of-the-hill challenge on Code Golf. In short, the purpose of the challenge is to code a slime that, trough various possible moves gains control over an ...
overactor's user avatar
  • 654
3 votes
1 answer
2k views

Parsing structured text in Java

I am quite new to Java. I have data structured like this: ...
yasar's user avatar
  • 1,597