This commit is contained in:
Felipe Domingos 2021-11-01 10:56:03 -03:00 committed by GitHub
parent aae3f0549c
commit 5b1ef40e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ public class ArvoreBinaria {
*/
private void inserirPai(int x, No i, No pai) throws Exception {
if (i == null) {
if(x < i.elemento){
if(x < pai.elemento){
pai.esq = new No(x);
} else {
pai.dir = new No(x);