Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

AVL Tree

Loop vs Recusrion realisation methods

The loop method is better than recursion.

  • [+] No stack overflow with big number of items.
  • [+] Lower performance costs than the recursion method.
  • [-] It uses an extra field in node for store a link to parent.

The recursion method is bad:

  • [-] It is the cause of stack overflow with big number of items. ERROR_CODE: (NTSTATUS) 0xc00000fd - A new guard page for the stack cannot be created.
  • [-] It requires additional performance costs for calling the functions of forming a new function frame and placing the return address in the stack.