旧视频:春哥上台 全场丢垃圾 高呼纯爷们 嘘声四起 中指林立# Joke - 肚皮舞运动
w*0
1 楼
guys,
I have write a C++ code for rotated sorted array, help me to check which
part need optimize
{7,8,9,10,11,12,1,2,3,4,5,6};
int CQuesionts::BinarySearch2(void)
{
/*
the array like
7 8 9 10 11 12 1 2 3 4 5 6, search x
*/
int x = 2;
int len = 12;
int data[]= {7,8,9,10,11,12,1,2,3,4,5,6};
int start = 0;
int end = 11;
int mid = 0;
int find = 0;
std::cout << "find " << x << std::endl;
for(int i =0 ; i < log((double)len) +1; ++i)
{
mi
I have write a C++ code for rotated sorted array, help me to check which
part need optimize
{7,8,9,10,11,12,1,2,3,4,5,6};
int CQuesionts::BinarySearch2(void)
{
/*
the array like
7 8 9 10 11 12 1 2 3 4 5 6, search x
*/
int x = 2;
int len = 12;
int data[]= {7,8,9,10,11,12,1,2,3,4,5,6};
int start = 0;
int end = 11;
int mid = 0;
int find = 0;
std::cout << "find " << x << std::endl;
for(int i =0 ; i < log((double)len) +1; ++i)
{
mi