File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -160,17 +160,17 @@ class ArvoreDeBuscaBinaria{
160
160
consultaPosOrdem ( raiz = this . raiz ) {
161
161
let auxiliar = raiz ;
162
162
163
- if ( auxiliar . esquerda != null ) this . consultaPreOrdem ( auxiliar . esquerda ) ;
164
- if ( auxiliar . direita != null ) this . consultaPreOrdem ( auxiliar . direita ) ;
163
+ if ( auxiliar . esquerda != null ) this . consultaPosOrdem ( auxiliar . esquerda ) ;
164
+ if ( auxiliar . direita != null ) this . consultaPosOrdem ( auxiliar . direita ) ;
165
165
console . log ( auxiliar . valor ) ;
166
166
}
167
167
168
168
consultaOrdem ( raiz = this . raiz ) {
169
169
let auxiliar = raiz ;
170
170
171
- if ( auxiliar . esquerda != null ) this . consultaPreOrdem ( auxiliar . esquerda ) ;
171
+ if ( auxiliar . esquerda != null ) this . consultaOrdem ( auxiliar . esquerda ) ;
172
172
console . log ( auxiliar . valor ) ;
173
- if ( auxiliar . direita != null ) this . consultaPreOrdem ( auxiliar . direita ) ;
173
+ if ( auxiliar . direita != null ) this . consultaOrdem ( auxiliar . direita ) ;
174
174
}
175
175
176
176
esvaziar ( ) {
You can’t perform that action at this time.
0 commit comments