G Giao Linh New member Sep 21, 2021 #1 What is a time complexity for finding the total length of all string on all edges of a tree? A. Ɵ B. Ɵ (n!) C. Ɵ (1) D. O (n$^{2}$)
What is a time complexity for finding the total length of all string on all edges of a tree? A. Ɵ B. Ɵ (n!) C. Ɵ (1) D. O (n$^{2}$)
N Nguyễn Tuyền New member Sep 21, 2021 #2 Answer: d Explanation: To check if a substring is present in a string of a length of n, the time complexity for such operation is found to be O . The time complexity for finding the total length of all string on all edges of a tree is O (n$^{2}$). Upvote 0 Downvote
Answer: d Explanation: To check if a substring is present in a string of a length of n, the time complexity for such operation is found to be O . The time complexity for finding the total length of all string on all edges of a tree is O (n$^{2}$).