This week we learned about recursive delete on Binary Search Tree, it's another delete method followed by the iterative delete. And then we talked about efficiency of algorithms. There are two basic points in the efficiency of a method, they are memory (space taken) and time (how long does it take to run the program. There are many types of efficiencies, such as "n", "log n", "n!" and so on.
Comparing to iterative functions, recursive functions tend to take more time and more memory. But recursive functions can be turned into iteratively function, which might take longer to write and less understandable.
No comments:
Post a Comment