Binary Search Algorithm | Functions and Arrays | Data Structures and Algorithms in JAVA

preview_player
Показать описание

NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we explain one of the most common algorithms, the Binary Search which is used for searching elements in a sorted array. The difference between linear search and binary search is also explained and the time complexity of binary search is discussed as well.

Рекомендации по теме
Комментарии
Автор

Nice explaination .thank you in return🔥🎉🎉🎉🥇🥇🥇

geetanegi
Автор

Please use the formula low + (high - left)/2 to calculate mid to avoid overflow.

sauravsrivastav
Автор

Sir, to make this more efficient we could also add one more if statement inside if and else statement if data==l print l and return and if data==h print h and return

harshitsangwan
Автор

Sir couldn't understood the role of "return". In this video specifically..

RahulSingh-ujde
Автор

Sir i'm getting confused with Break and Return. Like why we are using return and why we are not using Break. Kindly help me out sir.

kishorejangid
Автор

Sir code ko copy pen p dry run krke output analyse krna chaiye saare question k liye (thore smjhne wale). Kyunki mko jldi click nhi hota I'm bit dumb

anjneykumarsingh
Автор

Sir, unsorted array ke liye binary search jaisa algorithm ban skta hai kya?

aditya
Автор

public static int iterativeBinarySearch(int[] input, int value) {
int start = 0;
int end = input.length;
while (start < end) {
int midpoint = (start + end) / 2;
if (input[midpoint] == value) {
return midpoint;
} else if (input[midpoint] < value) {
start = midpoint + 1;
} else {
end = midpoint;
}
}
return -1;
}

SufiyanAhmed
Автор

No so good explaination.. Unable to understand

suyash_
join shbcf.ru