private IntNode inserer_rec(IntNode currentNode, int value) {
if (currentNode == null) {
return new IntNode(value);
- } else if (value < currentNode.getData()) {
+ }
+ if (value < currentNode.getData()) {
currentNode.setLeftNode(inserer_rec(currentNode.getLeftNode(), value));
} else if (value > currentNode.getData()) {
currentNode.setRightNode(inserer_rec(currentNode.getRightNode(), value));
private IntNode supprimer_rec(IntNode currentNode, int value) {
if (currentNode == null) {
return null;
- } else if (value == currentNode.getData()) {
+ }
+ if (value == currentNode.getData()) {
if (currentNode.getLeftNode() == null && currentNode.getRightNode() == null) {
return null;
} else if (currentNode.getRightNode() == null) {