1. development confusion 2. unite test difficulty 3. possible throughput problem with multithread program 4. slightly overhead for checking instance existance every time 1. worst case BST degenerates to a linked list 2. O(logn) insert/delete time 3. conding complexity
【在 c***g 的大作中提到】 : what's the downside of the sigleton? : what's the downside of the binary search tree compared to linked list?
【在 g**e 的大作中提到】 : : 1. development confusion : 2. unite test difficulty : 3. possible throughput problem with multithread program : 4. slightly overhead for checking instance existance every time : 1. worst case BST degenerates to a linked list : 2. O(logn) insert/delete time : 3. conding complexity
For BST, it uses more spaces than linked list - two pointers per entry compared to one.
【在 g**e 的大作中提到】 : : 1. development confusion : 2. unite test difficulty : 3. possible throughput problem with multithread program : 4. slightly overhead for checking instance existance every time : 1. worst case BST degenerates to a linked list : 2. O(logn) insert/delete time : 3. conding complexity