【翻唱】 yangyi -- 花旦(周华健)# Music - 天籁之音
j*n
1 楼
Given an integer array A[], what preprocessing you need to do so that when g
iven i and j such that i <= j, you can tell in O(1) time the number of eleme
nts in the array having values between and including i and j.
A graph is given. You need to design a data structure with minimum space com
plexity such that it does the follows
--> Finds whether nodes u and v have a path in between them in O(1) time.
--> Finds whether there is a path of length l between u and v in O(k) time.
What does the follo
iven i and j such that i <= j, you can tell in O(1) time the number of eleme
nts in the array having values between and including i and j.
A graph is given. You need to design a data structure with minimum space com
plexity such that it does the follows
--> Finds whether nodes u and v have a path in between them in O(1) time.
--> Finds whether there is a path of length l between u and v in O(k) time.
What does the follo