Linear Search Algorithm

preview_player
Показать описание
Demonstrates a linear search algorithm.

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

I was driving but I verbally did the exercise. It was both challenging and fulfilling. You are awesome.

tmdbah
Автор

it took me 3 minutes to write it in perl and hour and a half to figure out why it doesn't work.
Then i wrote version in haskell but i forgot to start a clock. Then python in 7 minutes, lua in 8 and a half, and then i tried c++. After 8 minutes of coding i spent 20 minutes trying to understand why this perfectly legit csharp code wont compile.
that was longest 5min long video in my life

maxfiialkovskyi
Автор

It took me about 2mins.. like the way you started the play list. excited to watch further....

srivanichalla
Автор

2 minutes. Thanks for your great work. Cheers from Poland! :)

antydsr
Автор

Hey Jamie! Long time viewer of your videos, first time commenting. Took me about 3 minutes, using Java :) Took me a few minutes to remember some of the syntax, but ended up with almost the same thing you wrote. Second guessed myself actually, and then realized I could refactor to cut out a few lines of code. Keep up the good work, I really appreciate all of your videos!

Icefox
Автор

It took me 10 minutes to write. I did not make it quite as compact as yours. Cool videos, learning stuff!

joshuaengel
Автор

I love your videos. Love your cat too. Thanks for the great videos and keep up the great work

uzairhasan
Автор

You are awesome! you are awesome! thank you for doing this! Took abt 4-5 minutes... cant wait for the next videos!

meensvenks
Автор

so glad I found your account! Really enjoy your teaching style. (5 minutes for the exercise)

kotic
Автор

3:40, C# in VisualStudio, done the same as Jamie. It took me 1 minute to figure out that .Length in a field instead of a method .Length() - that happens.

Zlobik
Автор

Hello Jamie! Great job and thank you for you lessons! It took me 3:51 using C# .

aristofanisl
Автор

Linear seach took about a minute because I didn't use Java since I left school. Changed it to a binary search, which took a bit longer since I had to sort it first and I always forget the details of a quicksort. Took about 5min.

mishegaz
Автор

Time 1:43. Wrote it in JavaScript because that's the language I am learning at the moment.
2:48 after testing and fixing a typo

shlude
Автор

3:28 initial time, 5:44 total with manual testing. Probably like 20 mins w/unit tests... I just figured this was a good time to practice Arrange//Act//Assert.

C#.

EnduranceT
Автор

I started watching your videos, just for chill, and then you force me to do this exercise! I used JavaScript in the Chrome developer console.

1:20 for writing and testing. I should have added an extra check to test if the object is a true array, I skipped it however because it would be JavaScript specific code.

function indexOf(arr, value)
{
if (!arr) return -1;

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

return -1;
}

DennyLindberg
Автор

Paused the video, did it in Java (my first working Java code, yeah me!), returned a bool and some messages, tried to improve a bit my algorithm, restarted the video to hear you wanted an int back, fixed the method, restarted the video to find out you wanted me to time myself... Looks like I am gonna have to wait for you to ask us to pause the video next time.

sylverg
Автор

7. I appreciate you "forcing" us to do exercises.

MarkGriep
Автор

there's only one video which made me literally wrote a piece code. Thanks :)

amityanarayan
Автор

3 minutes. My code looks exactly like yours! (Except for the naming conventions though. And my array was like {0, 1, 2, 3, 4, 5, 6, 7} instead of random, and I had the public access modifiers). Ok, not exactly then, but I did return a -1 after the for loop...

mariusErimar
Автор

To complete this in C#, my timing was 12 minutes [minus ~6 or so minutes from forgetting to pause the timer and going off on a reading tangent about access modifiers ]

matthamrick