Selection Sort Tutorial in Java: The Snail's Guide to Sorting

  Рет қаралды 59,079

Coding with John

Coding with John

Күн бұрын

Пікірлер: 63
@richardhasting6046
@richardhasting6046 Жыл бұрын
I wrote my first bubble sort, selection sort, and shell sort in 1981 in BASIC. I have no need to learn to sort anything, but I watch this because I love how you present it so nicely. You do a great job John!
@equationaeecrama8517
@equationaeecrama8517 Жыл бұрын
teach meeeee
@oof4dayz
@oof4dayz Жыл бұрын
I am currently taking a Data Structures and Algorithms course using Java and one of my assignments was to implement a variety of different sorting algorithms. You explain them and their implementations in a very understandable way, honestly better than my professor does. You just earned yourself a new subscriber!
@TheDeathMongrel
@TheDeathMongrel Жыл бұрын
I like your presentation style, other KZbinrs could learn much from this. You start by explaining what we're going to be doing before starting. You continue to explain as you go. And you do it all at a moderate speed that doesn't sound like you're trying to finish a 20 min lesson in 5 min (or on 400 tabs of speed). Also great is the lack of background music everyone thinks they have to add some but it only competes with one's voice.
@CodingWithJohn
@CodingWithJohn Жыл бұрын
I appreciate that!
@hbfl3x50
@hbfl3x50 Жыл бұрын
The best youtuber yet on data structures presentation, bravo mate 🫡❤🔥
@dennisysj8868
@dennisysj8868 Жыл бұрын
Hey can you do a tutorial on network programming for Java? Such as sockets, network client servers, application level protocols etc. Please it would be a big help as your the best teacher for java on KZbin so far.
@michael_scarn_
@michael_scarn_ 11 ай бұрын
Thank you John🙂You're such an amazing teacher.
@sandeepsindhu1420
@sandeepsindhu1420 6 ай бұрын
Hi sir, you are doing gods work for java beginners, you really are the John 🙏
@ravenklaus711
@ravenklaus711 7 ай бұрын
After watching several videos and still not understanding the core principal, your video helped me understand it clearly. Thanks a lot.
@Blezerker
@Blezerker Жыл бұрын
Love the content as always! I look forward to a spring tutorial:)
@notme-b3r
@notme-b3r Жыл бұрын
great video, just what i needed. couldn't understand selection sort for the past two three months
@rubens_cube
@rubens_cube Жыл бұрын
Hello John, I don't comment often, but I would just like to take the opportunity to thank you for all your videos. Your tutorials are simply incredible and I wish more people taught in the style you teach in. Whenever I forget how to work with something, rather than looking for an example online I often just rewatch your videos. I am not sure if you take requests for topics to cover, but there is one topic I would absolutely love to see on your channel. I have been messing around with Serialization recently and the fact that it even exists kind of blows my mind. I don't understand how it works at all and I cannot find any good explanations of it that I understood. I am unsure if this topic is simply not very well known or if it is too advanced, but I would love to actually understand how it works, because right now, it feels like absolutely magic! I totally understand if you do not want to cover this, I know any other topic you cover will be equally amazing, but if you do consider it, it would make me very happy! If you are not interested in this topic, do you perhaps know a good source to learn how serialization works? Anyways, keep doing what you do, because your videos are simply wonderful!
@sekharsamanta6266
@sekharsamanta6266 Жыл бұрын
Hi @John you make us visualize so well.. I need to work with a single loop to optimize though I've not tried it yet
@yikechen1470
@yikechen1470 7 ай бұрын
your explanation is truly amazing! Thanks!
@Roberto-lb5or
@Roberto-lb5or Жыл бұрын
I like the way you explain.
@CarlosCed
@CarlosCed Жыл бұрын
This is very nice. I'll watch your quick sort and merge sort algorithms. I imagine that you will use an Arraylist, because you explain in your other videos that these are faster for searches (use constant time), but I am a coding noob theorizing. I am excited to see how you do it.
@misterwoody_
@misterwoody_ Жыл бұрын
Great to see more content from you John. I assume I would mentally file this in the beginner programmer category as it's a great little teaching exercise or test for someone.
@amaralensheriff
@amaralensheriff Жыл бұрын
More videos on Java APIs please John 😁🙏
@cylorun
@cylorun Жыл бұрын
best java youtuber ever
@mirabugata
@mirabugata Жыл бұрын
Thanks John! This was really helpful.
@Speiger
@Speiger Жыл бұрын
Huh your code example actually showed me a small bug in my library, where i didn't do the "to-1" in the outer loop. And just fixed that. Luckily it was just a tiny oversight ^^ (I have unit test run on it but that one didn't get caught xD) Great video!
@MrSome1body
@MrSome1body Жыл бұрын
You Rock John!
@jeloabmelak9783
@jeloabmelak9783 Жыл бұрын
patiently waiting for the socket programming turtorial🙃
@megasusmegajos4321
@megasusmegajos4321 Жыл бұрын
Can you make a video about JPA(Java Persistence API) specification and JPQL(Java Persistence Query Language)?
@ΔΙΟΝΥΣΙΟΣΧΑΡΑΛΑΜΠΟΠΟΥΛΟΣ
@ΔΙΟΝΥΣΙΟΣΧΑΡΑΛΑΜΠΟΠΟΥΛΟΣ Жыл бұрын
Really nice... So I ve got a question. What is the purpose of using selection sort if it is so slow?
@JaniaJones-b4g
@JaniaJones-b4g 6 ай бұрын
thanks for another great video. can you post the link to this code please!
@ytprem4709
@ytprem4709 Жыл бұрын
Thank you so much! Keep it up
@manarsalem1685
@manarsalem1685 6 ай бұрын
What happens if the element, of the outer loop, that we are comparing happens to be the smallest element anyway? The swap method will still work, and it will use the index of the element previously compared and the swapping would still be done...
@Crimary5580
@Crimary5580 Жыл бұрын
Gonna use my luck with Bogo-Sort algorithm
@mminahid9662
@mminahid9662 Жыл бұрын
in javaFX Application is an abstract class. In this abstract class there have some abstract methods which are overridden in main class which extends abstract Application class and also have static launch() method in abstract class Application. The launch() method calls from the main method in main class. Now how is it possible launch() method calls these abstract methods and for these calls overridden methods in main class are executes? please help to understand
@miguelangelavilagalan790
@miguelangelavilagalan790 Жыл бұрын
NIce videos buddy and really useful. By the way, you might consider to make a tutorial about javaFX in order to design some nice interfaces and afterward develop the beautiful logic. I am not by any mean a developer (yet) but I'm working myself in a small project (just for fun) about a calculator.
@lowkee9731
@lowkee9731 Жыл бұрын
John this is awesome...can i do all this on Java NetBeans as well? I am a new to coding. Or should i get intellij to perform this?
@CodingWithJohn
@CodingWithJohn 7 ай бұрын
Any IDE you're comfortable with is fine!
@VercilJuan
@VercilJuan Жыл бұрын
could you do heap sort?
@rahulchavan6488
@rahulchavan6488 Жыл бұрын
Sir can you provide a step by step approach for preparing for DSA?
@deepak-rajak
@deepak-rajak Жыл бұрын
I like your text editor especially the dark theme. Can you please give me a reference to install the same.❤❤
@charleslyell3748
@charleslyell3748 4 ай бұрын
IntelliJ
@kallolbhattacharya488
@kallolbhattacharya488 Жыл бұрын
Please explain insertion sort
@davidscully2476
@davidscully2476 Жыл бұрын
The timestamps are from a previous video fyi
@CodingWithJohn
@CodingWithJohn Жыл бұрын
Thanks! Removed for now till I have time to update later.
@davidscully2476
@davidscully2476 Жыл бұрын
@@CodingWithJohn No worries, love the videos! Feel free to delete my comment :)
@CodingWithJohn
@CodingWithJohn Жыл бұрын
@David Scully Nah I don't mind the bit of humiliation
@misterwoody_
@misterwoody_ Жыл бұрын
Everyone makes mistakes and if you haven't yet, the day is fast approaching 🙂 Update - I guess I should have said that's why we have unit tests
@vedantjha2327
@vedantjha2327 Жыл бұрын
Why subtopic suggests Vectors and multithreading?
@CodingWithJohn
@CodingWithJohn Жыл бұрын
I copy pasted the last video's description and forgot to update the part that does the chapters >_> I updated it, but sometimes KZbin takes its time for that to take effect. Sorry about that!
@vedantjha2327
@vedantjha2327 Жыл бұрын
@@CodingWithJohn np John , you r great
@clingyking2774
@clingyking2774 Жыл бұрын
I'm the first here I guess. To more years of Java & an incoming Springboot video.
@toke7342
@toke7342 Жыл бұрын
I was here first. 1 min after upload.
@falconheavy595
@falconheavy595 Жыл бұрын
@@toke7342 stop measuring and comparing D
@toke7342
@toke7342 Жыл бұрын
@@falconheavy595 ???
@kemalali5683
@kemalali5683 Жыл бұрын
here is my code which is before the video coded public class Main { public static void main(String[] args) { //int []arr1={4,5,1,2,3,9,1,2,8,0,7}; int []arr1=new int[300000]; Random random=new Random(); for (int i=0; i
@Saiyan412
@Saiyan412 7 ай бұрын
I tried with 10k and it took ,95ms .
@hashamyounas3864
@hashamyounas3864 Жыл бұрын
What is that theme BTW??
@falconheavy595
@falconheavy595 Жыл бұрын
it's default intelliJ
@FreshThanatos
@FreshThanatos Жыл бұрын
At the time i watched the video, it had 69 likes c: and I .. I just destroyed it and liked the video. Sorry John. Sad to see the 69 move away but nice to see the video anyway. As a challange I coded the sort after your explanation and after that I watched the video to see if I'm right. I didnt done the length - 1 part in the first loop :/ and I did the printing of those arrays with a loop going over the array and printing it ( because I forgot that the Arrays class can do it as well. But I'm still proud to code it alone by just your explanation ^-^
@CodingWithJohn
@CodingWithJohn Жыл бұрын
There's always tons of ways to do the same thing. Nice job!
@begumsubas7787
@begumsubas7787 Жыл бұрын
I think I'm in love with you 😍💫
@muhammedefeorhanl7055
@muhammedefeorhanl7055 6 ай бұрын
only bald dude i like
@DavidOwen-e7s
@DavidOwen-e7s 7 ай бұрын
just starting with these sorting algorithms and I can already tell this one seems highly inefficient.
@yon1623
@yon1623 Жыл бұрын
MAN THIS IS SUCH A BAD WAY OF TEACHING IT. why not start from concept explain the algorithm and write the code one at a time . he showed us how he would write it not teach it. Students i suggest finding another video
@CodingWithJohn
@CodingWithJohn Жыл бұрын
The whole first section describes how the algorithm works, with a visual example, before we dive into any code at all. Thanks for watching!
@Ro-ln6wm
@Ro-ln6wm Жыл бұрын
Hi John, you doing an amazing job by explaining in such understandable way, really enjoying your videos, I would like to ask you a question, maybe you can make a video concerning to "stream api" I can't find explanation on how functional interfaces work inside of the "Stream" methods, for example SomeStream.filter(x->x%2==0), as I understand here is "Predicate", but he is not called inside of the brackets, only implementing, that's confusing.
Merge Sort Algorithm in Java - Full Tutorial with Source
23:02
Coding with John
Рет қаралды 187 М.
Insertion Sort Algorithm in Java - Full Tutorial With Source
10:17
Coding with John
Рет қаралды 107 М.
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
Из какого города смотришь? 😃
00:34
МЯТНАЯ ФАНТА
Рет қаралды 2,5 МЛН
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 852 М.
Learn Selection Sort in 8 minutes 🔦
8:21
Bro Code
Рет қаралды 265 М.
Quicksort Sort Algorithm in Java - Full Tutorial With Source
24:58
Coding with John
Рет қаралды 251 М.
Optionals In Java - Simple Tutorial
15:53
Coding with John
Рет қаралды 220 М.
3 Types of Algorithms Every Programmer Needs to Know
13:12
ForrestKnight
Рет қаралды 500 М.
Stop Using FirstOrDefault in .NET! | Code Cop #021
12:54
Nick Chapsas
Рет қаралды 94 М.
Binary Search in Java - Full Simple Coding Tutorial
17:48
Coding with John
Рет қаралды 127 М.
Sorting Algorithms Explained Visually
9:01
Beyond Fireship
Рет қаралды 551 М.
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24