Advertisement
cardel

Agrega prueba Java

Dec 6th, 2022 (edited)
1,210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1.         ArbolRojinegro instanciaC = new ArbolRojinegro(null, null, -1, true);
  2.          
  3.         for (int i = 0; i < 500; i++) {
  4.             instanciaC.insertar(i);
  5.         }
  6.  
  7.         assertTrue(altura(instanciaC) <= 2 * Math.log(500) / Math.log(2) + 1);
  8.  
  9.         ArbolRojinegro instanciaD = new ArbolRojinegro(null, null, -1, true);        
  10.  
  11.         for (int i = 499; i >= 0; i--) {
  12.             instanciaD.insertar(i);
  13.         }
  14.  
  15.         assertTrue(altura(instanciaD) <= 2 * Math.log(500) / Math.log(2) + 1);
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement