问个问题binary search 的变体# JobHunting - 待字闺中
B*p
1 楼
Given a sorted array of strings which is interspersed with empty strings,
write a meth-
od to find the location of a given string
如果碰到空的str怎么办,找下一个非空的str,这样worst case就是o(n)不是o(logn)了
多谢
write a meth-
od to find the location of a given string
如果碰到空的str怎么办,找下一个非空的str,这样worst case就是o(n)不是o(logn)了
多谢