Finished ? No, we still can do better. As the passed String parameters won't be changed, let us make them final
the same is true for the root
field. Also as janos has answered
Finished ? No, we still can do better. As the passed String parameters won't be changed, let us make them final
the same is true for the root
field. Also as janos has answered
If node.isEmpty()
we won't need to check if (!node.containsKey(character))
anymore.
Also if (!node.containsKey(character))
evaluates one time to true
we, we won't need to check this anymore. Let us add a new method:
But wait, we can do even better, as node.isEmpty()
should also be used in the contains()
method
If node.isEmpty()
we won't need to check if (!node.containsKey(character))
anymore.
Also if (!node.containsKey(character))
evaluates one time to true
we we won't need to check this anymore. Let us add a new method
But wait, we can do better, as node.isEmpty()
should also be used in the contains()
method
If node.isEmpty()
we won't need to check if (!node.containsKey(character))
anymore.
Also if (!node.containsKey(character))
evaluates one time to true
, we won't need to check this anymore. Let us add a new method:
But wait, we can do even better, as node.isEmpty()
should also be used in the contains()
method