Learn Linear Search in 3 minutes ⬇️

Learn Linear Search in 3 minutes ⬇️

Bro Code

2 года назад

100,252 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Bro Code
Bro Code - 16.10.2021 22:37

public class Main{

public static void main(String args[]){

// linear search = Iterate through a collection one element at a time

int[] array = {9, 1, 8, 2, 7, 3, 6, 4, 5};

int index = linearSearch(array, 5);

if(index != -1) {
System.out.println("Element found at index: " + index);
}
else {
System.out.println("Element not found");
}

}

private static int linearSearch(int[] array, int value) {

for(int i = 0; i < array.length; i++) {
if(array[i] == value) {
return i;
}
}

return -1;
}
}

Ответить
xoshiiii
xoshiiii - 06.09.2023 08:08

bro just casually explained my whole 1 hour class lmao

Ответить
Everton Dias
Everton Dias - 15.08.2023 02:46

Thanks, Bro!

Ответить
Mr. Loser
Mr. Loser - 14.06.2023 17:58

Thanks!

Ответить
Calvin Neill
Calvin Neill - 14.05.2023 18:06

I am going through Cyber security school currently. The texts are very long and complicated in a reading format, yet here you are teacher better than my text books. Thank you, you've helped me understand and grasp a lot this last year.

Ответить
AR 7
AR 7 - 14.05.2023 05:59

Random comment

Ответить
لا حول ولا قوه الا بالله
لا حول ولا قوه الا بالله - 08.05.2023 23:07

Thank you so much 💓
صلوا على رسول الله ❤

Ответить
Jahanzaib Afzal
Jahanzaib Afzal - 27.04.2023 20:05

if u r wondering iterate = repeat
(cuz i did)

Ответить
CoffeeXmusic
CoffeeXmusic - 27.02.2023 11:48

Love your series, very concise and clear!

Ответить
JENKAR
JENKAR - 10.12.2022 20:14

Man that Gigachad icon truely sets for you.

Ответить
Meiyappan Amirthalingam
Meiyappan Amirthalingam - 22.11.2022 11:12

Please don't remove the commented theory Bro. I need that too. Love from India.😁

Ответить
mamutthe
mamutthe - 02.11.2022 03:01

thanks!!

Ответить
Gerald Genita
Gerald Genita - 28.10.2022 13:30

how to put a counter++?

Ответить
Don't mind me, I'm just passing by
Don't mind me, I'm just passing by - 17.10.2022 16:38

Respect, bro! <3

Ответить
jevardsp proxyAcct
jevardsp proxyAcct - 08.10.2022 18:07

Randomly encountered this channel some time ago , got hooked to the some-programming-language-in-an hour vids

and now discovered that bro also does DSA...

now cramming for a tech interview

Ответить
Felix Ondieki Nyamongo
Felix Ondieki Nyamongo - 11.08.2022 17:47

So... your one weird trick is being actually good at coding and great at teaching🤔😂😂 Love your content Bro💪

Ответить
Paul Vincent Desamparado
Paul Vincent Desamparado - 04.06.2022 18:37

what would be the title of that problem code?

Ответить
Salceda, Joshua C.
Salceda, Joshua C. - 11.03.2022 13:57

Very clear bro. Thanks a lot.

Ответить
kai iemsawat
kai iemsawat - 28.01.2022 08:48

Very nice tutorial as always!!! Is there any way to see if there another index with the same value?

Ответить
Mils D
Mils D - 07.11.2021 15:57

As always clear and easy to follow tutorial on something that will be very useful.
Thanks Bro. 👍👍

Ответить
AAP - All About Programming
AAP - All About Programming - 21.10.2021 05:43

Started DSA right?

Ответить
Federico Ramirez
Federico Ramirez - 18.10.2021 04:44

What a Beast

Ответить
JJ L
JJ L - 17.10.2021 17:57

thank you, keep going please

Ответить
jaymar921
jaymar921 - 17.10.2021 04:07

Cool bro

Ответить
Angel Mladenov
Angel Mladenov - 16.10.2021 23:15

Lol you just liked my comment for more java algorithms and data structures and you posted this video😍🥰

Ответить
N8Zone
N8Zone - 16.10.2021 23:09

Didn't you just post this poll like two days ago? you really are one of the best coding tutorial channels out there man, keep it up.

Ответить
W33D Enjoyer
W33D Enjoyer - 16.10.2021 22:58

Hey bro code ! I really enjoy watching your vids im learning something new everytime. You are smart guy ngl. And if you know LUA scripting can you make a full course about it ? I would really appreciate that.
<3
xoxo

Ответить
NEERAJ
NEERAJ - 16.10.2021 22:53

👍

Ответить
Ermes Margjeka
Ermes Margjeka - 16.10.2021 22:50

POV my goal is to have a little heart from Bro code.
POV is not a POV.

Ответить
Kunwardeep Singh
Kunwardeep Singh - 16.10.2021 22:48

Its a very informative video, great job.

Ответить