bugs
This commit is contained in:
parent
aae3f0549c
commit
5b1ef40e80
|
|
@ -169,7 +169,7 @@ public class ArvoreBinaria {
|
||||||
*/
|
*/
|
||||||
private void inserirPai(int x, No i, No pai) throws Exception {
|
private void inserirPai(int x, No i, No pai) throws Exception {
|
||||||
if (i == null) {
|
if (i == null) {
|
||||||
if(x < i.elemento){
|
if(x < pai.elemento){
|
||||||
pai.esq = new No(x);
|
pai.esq = new No(x);
|
||||||
} else {
|
} else {
|
||||||
pai.dir = new No(x);
|
pai.dir = new No(x);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue