What are the time and space complexities associated with searching an element in a binary search tree?