{"video_id":"ixXOUeBOPJw","comment_count":48,"fetched_at":"2026-10-23T15:38:17+00:00","source":"innertube_next","comments":[{"id":"Ugyn58nXblRF0BFW0014AaABAg","text":"Sort your coding skills with 25% off your first payment for boot.dev Click this link https://boot.dev/?promo=STANDUPMATHS and use my code STANDUPMATHS\n\nYes, I know a pinned comment has broken the sorting of the comments.","author":"@standupmaths","author_id":"UCSju5G2aFaWMqn-_0YBtq5A","like_count":211,"published_time":"1 month ago"},{"id":"Ugy0tf3HWharix5AmUp4AaABAg","text":"My favourite sorting algorithm is the Miracle Sort: does nothing and loops endlessly, hoping a cosmic ray or memory error shifts the data into the correct order.","author":"@RequiemAeterman","author_id":"UCF7G1SCHH4KVLDhimiv30SA","like_count":5,"published_time":"1 month ago"},{"id":"UgyDQqOzPqOCHDvh62d4AaABAg","text":"Next video: \"Someone made my sorting algorithm 40,832,277,770% less efficient\"","author":"@MonochromeSouls","author_id":"UCZPzs63EjLpW3XiTvyc3xbA","like_count":5,"published_time":"1 month ago"},{"id":"Ugw9uqZJADL1D0nIsCV4AaABAg","text":"A sorting algorithm so inefficient you'd think it was written by Matt Parker","author":"@Neefew","author_id":"UCT9RqC_pPxan6oVk_KXqyOg","like_count":2,"published_time":"1 month ago"},{"id":"Ugy1w-i37QRgDAB546p4AaABAg","text":"The inventor of qsort (Tony Hoare) said my second-favorite quote: \"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.\". He also invented null pointer, but has publicly apologized about that :D","author":"@DjKorppi","author_id":"UCyY0YLn9Vai6gRnu9GWpYaA","like_count":437,"published_time":"1 month ago"},{"id":"UgzzEEGuenzAdetjgS94AaABAg","text":"9:35 it should be if A[i] < A[j], not if i < j","author":"@M4rtingale","author_id":"UCbnKPwp2AFcrDTpAqCOb6pA","like_count":3,"published_time":"1 month ago"},{"id":"UgxCWw16qMTYb5W469x4AaABAg","text":"Matt saying \"I don't wanna risk getting a job\" gotta be in his Top 5 things to ever say.","author":"@ChadTanker","author_id":"UCbZ1C4yv4DEMBndZbOrOY4g","like_count":522,"published_time":"1 month ago"},{"id":"UgweSjwOPJeo4jIUmDF4AaABAg","text":"This reminds me of the apocryphal story where a presenter was walking through a proof in front of Pauli, and said, \"... and the sign checks out, so we know we haven't made any mistakes,\" and Pauli said, \"You mean that you have made an even number of mistakes.\"","author":"@odysseus9672","author_id":"UCWU5L6h6X_J4NrFQoTUY3SQ","like_count":1,"published_time":"1 month ago"},{"id":"Ugy210h-c0diQ1SqT3h4AaABAg","text":"I think my favourite part about this is the fact that in the particular case where the list is already correct, I Can't Believe It Can Sort is actually worse than both Bogo Sort, Thanos Sort, and even Miracle Sort","author":"@DavidSavinainen","author_id":"UCH5gpMgtUFdEVNQ_yjR6zKw","like_count":353,"published_time":"1 month ago"},{"id":"UgypHX8bLKRJ5dxStQt4AaABAg","text":"As a research chemist, I prefer to just throw the list into a mass spectrometer.","author":"@Rubrickety","author_id":"UCzS7IBpYzeu5DCE-_g6a2CQ","like_count":1,"published_time":"1 month ago"},{"id":"UgwY07IoBOPfTp2o5PB4AaABAg","text":"My most ridiculous sort is Stalin sort: Remove every element that is not properly sorted until a sorted list is left.","author":"@IsYitzach","author_id":"UCDDonmmidkDbkycO5Sh0mKA","like_count":716,"published_time":"1 month ago"},{"id":"UgwgiWAqTdL5FAU0fE94AaABAg","text":"Since the largest item goes to the wrong end and then comes back, it seems that \"boomerang sort\" would be a decent name for this","author":"@colonelb","author_id":"UCTwaHkpfyeaiGnbcrhz1XjA","like_count":973,"published_time":"1 month ago"},{"id":"Ugw8nRYcVaUdk0SSGpZ4AaABAg","text":"\"Two wrongs don't make a right.\"\nTrue, but it does make a sorting algorithm apparently.","author":"@prewgamer3696","author_id":"UCmWhAB0WPTHiz8UkSfprCsw","like_count":8,"published_time":"1 month ago"},{"id":"Ugzgn7HjlYzqyH3h_ax4AaABAg","text":"This video reminds me of a quote I heard at some point:\nThe most infuriating question in IT is not \"Why doesn't this work when it clearly should?\", it's \"Why does this work when it clearly shouldn't?\"","author":"@Elanthiel","author_id":"UCafJzut6cVL0-AlcKq5400A","like_count":383,"published_time":"1 month ago"},{"id":"UgyiTRE8bC4k09E38vB4AaABAg","text":"If you're sorting horses, you don't want two equal horses to change order.\n\n\n\nThat's why you use a stable sort.","author":"@pierreabbat6157","author_id":"UCjyuydalKW9r95avxWd9DKQ","like_count":417,"published_time":"1 month ago"},{"id":"UgwkFpmnsdQNTvkauhh4AaABAg","text":"0:30 \"this should be broken, but it is working. Why is it working? It should not be working.\" as a software engineer, when I find myself asking that question, it's usually the prelude to having a very stressful day. 🤣","author":"@rzeqdw","author_id":"UCTkO2rhlxxZ8nCFgdvqZaRg","like_count":712,"published_time":"1 month ago"},{"id":"UgwmKogijtYbLheF7GF4AaABAg","text":"Sort by Newest is how we find our own comments bc we messed them up.","author":"@iainburgess8577","author_id":"UC2Kj8DDH1GlSIsOyv3maaZg","like_count":25,"published_time":"1 month ago"},{"id":"Ugw8pBtaHKP0BCv8fy54AaABAg","text":"\"first things first, as is the theme today\"\n\nWow, that one was subtle, and genius. Took me several seconds until I realized what you just had done there xD","author":"@feha92","author_id":"UC_DY2DUNMAPrbNnDXcutrpw","like_count":688,"published_time":"1 month ago"},{"id":"UgxvlKkV2l-UxL3mmqd4AaABAg","text":"Funny thing: in Spain, we call a computer \"ordenador\", from \"ordenar\", which means \"to sort\", so a computer, to us, is a sorting machine. No one thinks of the word in the etymological way, but that's what it means!","author":"@gigaherz_","author_id":"UCGUrnwMfAhD6pLJANwW-Xog","like_count":307,"published_time":"1 month ago"},{"id":"Ugznca6l2xs9Hq3Zext4AaABAg","text":"You forgot Quantum Bogo Sort where you check if the list is in order. If it is then the sort ends. If it is not, you destroy the universe and check the next available universe.","author":"@melance","author_id":"UCGsxBgdD7hlmc0We_FssTTA","like_count":362,"published_time":"1 month ago"},{"id":"UgxPQebBz1iXeXh2IC14AaABAg","text":"There's got to be at least 3 of the 7 stages of grief about the algorithm working in this video","author":"@jblen","author_id":"UCY-eZxgNqKq8etO1IJ-y7xg","like_count":32,"published_time":"1 month ago"},{"id":"Ugy4HohKOfS5qZDcvj14AaABAg","text":"10:15 Small correction on the white board, the check should be L[i] < L[j] not i < j","author":"@the-avid-engineer","author_id":"UCwqhaYNrDXrKdGblKRnv01w","like_count":620,"published_time":"1 month ago"},{"id":"Ugy8M8t62mG0sAAMYrV4AaABAg","text":"I just love how someone tried to make an algorithm that couldn’t sort and it still ends up sorting","author":"@tackontitan","author_id":"UCNN2NWuXNqk-yYcWchhlOHA","like_count":6,"published_time":"1 month ago"},{"id":"UgyWIEu8aZJYePEP2214AaABAg","text":"At 7:27, you mean “if L[i] > L[i+1]” rather than “if i > i+1”.\nSimilarly with i & j at 10:00.","author":"@tristan3141","author_id":"UCQifXkFnv9Bnos3IaWDgiKA","like_count":651,"published_time":"1 month ago"},{"id":"UgwdkP5Z-2N-VLVdyhp4AaABAg","text":"18:37 I think the name of the algorithm is \"I don't believe it can\" so that when talking about it, it becomes \"I don't believe it can sort\"","author":"@damnerd","author_id":"UCndFkwzKeoRoNUoF4cc7T5Q","like_count":76,"published_time":"1 month ago"},{"id":"UgyRx85dsNxNkfQFYMJ4AaABAg","text":"“Make a sorting algorithm that makes O(n²) comparisons.” OK, here’s your sorting algorithm. It makes exactly n² comparisons.","author":"@heto795","author_id":"UC23B6VDwWGgaNwNg5s_tRBQ","like_count":30,"published_time":"1 month ago"},{"id":"UgykKT75ZaUpNB5Vyl94AaABAg","text":"This algorithm is actually used in Virtual League Baseball 2, a Virtual Boy game made in in 1996 (but unreleased until last year). The algorithm does way more swaps than it needs to, since the biggest item is moved to the start and slowly moved up. Not only that, but the swaps are very expensive: but each item is 32 bytes, so each swap copies 32 bytes 3 times. Despite only sorting 19 items, it slowed down my Virtual Boy emulator so much that in order to run the game at full speed, I made it detect that sorting code and replace it with a better algorithm (insertion sort on a list of pointers, with everything moved to the right place afterwards).","author":"@Skyfloogle","author_id":"UCXCJ9JMHp7YA0gls49gnONA","like_count":307,"published_time":"1 month ago"},{"id":"UgzkiRrxKqym6keR86R4AaABAg","text":"Matt,  @8:38 the Bubble sort pseudo-code is wrong in 3 ways.\n(1) No outer loop, so your for-loop runs just once. You mention it repeats, but there is no control-flow structure to perform this. \n(2)  Finished is set to True on each and every iteration of the for-loop.  It needs to be moved outside (above) this loop.  \n(3) You compare the indices \"i > i + 1\" and not the list value at that index.  I.e., this should be \"L[i] > L[i+1]\".","author":"@steve_j_grundon","author_id":"UCHRXzskZRs2wMJfJ_eJQX7A","like_count":305,"published_time":"1 month ago (edited)"},{"id":"UgxH0ym3IYybJxt3h0h4AaABAg","text":"Radix sort is a bit of a mind-bender. I'd really recommend the Polylog video about it, it's excellent.\n\nYou simply group numbers repeatedly by each single digit in order of least to most significance. Which means that the number of operations scales in accordance with the number of digits (but also sort-of the 'size' of those digits, i.e. the base).\n\nThat makes it unbelievably fast, but it cheats, because it's not really a generalised sorting algorithm, since it only makes sense for natural numbers. The IEEE consortium were clever, however, and designed floating point representation such that radix works anyway..\n\nThe performance characteristics are also weird: for larger input lists with larger numbers, it makes sense to use larger bases, sometimes really really large bases like base 2^32.","author":"@finndriver1063","author_id":"UCzReNDnGBVOoNehhMfyosjA","like_count":2,"published_time":"1 month ago"},{"id":"Ugw3PufuX3f6mm9YV_J4AaABAg","text":"My favourite is definitely SleepSort. I love the perfection of something that is guaranteed to work perfectly in maths land but which can go horribly wrong in the real world.","author":"@JimCullen","author_id":"UC8U9eYfX6luLsZ_byhOIh_w","like_count":241,"published_time":"1 month ago"},{"id":"Ugy2iYuml8I3TzvbIzF4AaABAg","text":"My favorite aspect of sorting algorithms is how they have this really cool lower bound on complexity where a (comparative) sorting algorithm cannot be better than O(n log n), but they also have this weird soft upper bound where anything worse than O(n^2) is almost guaranteed to be deliberately inefficient, but there's also this wide variety of more or less intuitive algorithms that all sit at exactly O(n^2). And I'm happy to see that the ever-growing O(n^2) club got a new member.\nOne who's probably in contention for being the most unintuitive one of the bunch.","author":"@doomse150","author_id":"UC2VzxnFlxTV6ph01LJ-G0zg","like_count":16,"published_time":"1 month ago"},{"id":"UgyPWUjOe41WtPYE8M54AaABAg","text":"Despite it being terrible, you will always know exactly how long it will take to sort a list using that method.","author":"@PurpleMonkeyMad","author_id":"UC135GjYBVIJ5S5wL-LZMUDw","like_count":128,"published_time":"1 month ago"},{"id":"UgyGjzFmc22m-5fyaSx4AaABAg","text":"Parker Sort: an algorithm that jumbles the numbers until it’s about 80% sorted.","author":"@lucbloom","author_id":"UCWjGdYT6NPpq5pWo9xOpT1g","like_count":6,"published_time":"1 month ago"},{"id":"UgzJP4TLbuVjYb6Nshd4AaABAg","text":"@9:25 this \"pseudocode\" would indeed not work because it compares the indices, not the elements at those indices. (Needless to say, it's not the code you showed at the start of the video.)","author":"@ysakhno","author_id":"UCCCE8xU6VI-SrRBnTQBuPvQ","like_count":18,"published_time":"1 month ago"},{"id":"UgyJ1_iyTm6rdtrFvFh4AaABAg","text":"You should always sort by latest because popular comments are usually bs and random","author":"@80HD-0","author_id":"UCZLkUIjkMtS6L5llHim5tSA","like_count":4,"published_time":"2 weeks ago"},{"id":"UgxpaR73EyP6gIajaIt4AaABAg","text":"I'm just surprised at the one student who managed to figure out that this works without running it themselves.","author":"@AntiVectorTV","author_id":"UCCReyKausHERsgJA7knN_lw","like_count":8,"published_time":"1 month ago"},{"id":"UgwUvSe-G2QNeusufId4AaABAg","text":"Provided pseudocode for the bubble sort is incorrect. It will not sort array like [2,3,4,1] at all, because the very first pair will make it think that it's done.\nBubble sort is two loops:\n\nfor j=0  to n-2\n  for i=0 to j\n    if [i] > [i+1] then [i], [i+1] = [i+1], [i]\n\nOnce they are done, the array is sorted in ascending fashion.","author":"@AntonMikhaylov","author_id":"UCPgXeFuLgFOdFeWXCSZ_IOQ","like_count":0,"published_time":"1 month ago"},{"id":"UgxfLUdsyUwenVefAkd4AaABAg","text":"In the spirit of Thanos sort, I will give you Trump Sort: it tells you it is sorted and you are not allowed to check.","author":"@kevinsmouts7326","author_id":"UC5aySd9qzbw3HNUsTxKXDGg","like_count":20,"published_time":"1 month ago"},{"id":"UgzXFkIXksSwRqifbEp4AaABAg","text":"Hello to the people sorting by most recent","author":"@bacon.cheesecake","author_id":"UC1HbjOKRXaPoF4JI7COygoQ","like_count":6,"published_time":"1 month ago"},{"id":"Ugw8bjtl8nyx62VTnox4AaABAg","text":"Randomize all the list, check if it is sorted from lowest to highest. If not, randomize again, check again. If not...","author":"@andrejsasd8904","author_id":"UCBZpbuNb6wR56WLxDFc4ePg","like_count":5,"published_time":"1 month ago"},{"id":"UgxdyX6HlE7GsPEpa-t4AaABAg","text":"I scrolled through the top 20+ comments and nobody pointed out that the bubble sort pseudo code was incorrect. It was just one pass. You had to put a while loop on top of the for and check the finished flag there.\n\nAnd the second one too! You code to compare I and j, but in the demonstration you actually compare L[i] and L[j]. \n\nI'm not that concerned about the mistakes, it's OK and people can still get the point of the video nevertheless. I'm just concerned that this correction is not in the top comments. It seems nobody cares about the code on YouTube","author":"@maxkarpov","author_id":"UCkOYVgJf0L-8THj3uCxcwhQ","like_count":0,"published_time":"1 month ago"},{"id":"Ugzs0Qy28WZ62RteLqp4AaABAg","text":"The worst sorting algorithm is Miracle Sort. Wait a few seconds, then recheck if it's already sorted. Only works if cosmic rays flip the bits for you.","author":"@undine120","author_id":"UChSm24jOVsvo4T3SBeeUBTA","like_count":8,"published_time":"1 month ago"},{"id":"UgwsVEJ6vUCv6UB9Y394AaABAg","text":"7:34 literally never is i > i+1","author":"@halfsourlizard9319","author_id":"UCJYa4jfjwfSTVjff4-OilFQ","like_count":0,"published_time":"2 weeks ago"},{"id":"UgwnoKdX4ICRnHOSZ4R4AaABAg","text":"One often overlooked detail with sorting algorithms: they don’t all treat equal values the same way. A stable sort keeps equal items in their original relative order, while an unstable sort makes no such guarantee. The final values may look equally “sorted,” but the result can still be different.","author":"@filipvanham6052","author_id":"UCO69ePE4spRNO2tQVfSgPRA","like_count":7,"published_time":"1 month ago"},{"id":"UgztgarZlqJoImk7MpJ4AaABAg","text":"I'm by no means a pro, but if you have an array of 20 positions, filled with unsorted unsigned integers and the largest value is 78 as an example, can't you create ANOTHER array of booleans of length 78, setting to TRUE the position that matches each value of Array A. Then cycle Array B, assigning the position as a value to array A where the index is TRUE?","author":"@titanicpat1275","author_id":"UC-GqIpOysDW_Fk7NXWF6geQ","like_count":0,"published_time":"1 month ago (edited)"},{"id":"UgxKmv31XnNs8M7QX8V4AaABAg","text":"Hello monsters!","author":"@mortismain6719","author_id":"UCoBC0RdXJ-NnUWjxOxeZmHg","like_count":5,"published_time":"1 month ago"},{"id":"UgwyJBT103692_qLerF4AaABAg","text":"I see you sorting by newest","author":"@Mrcheesebumble","author_id":"UCe9hA54E3y2D_4G_SThwGIQ","like_count":4,"published_time":"1 month ago"},{"id":"UgyPBNATjJAxm75R-iF4AaABAg","text":"3:50 Obama making a joke about the inefficiency of bubble sort is the last thing I expected in this video..","author":"@alextonev3017","author_id":"UCs2nWezRvQVNB4tcfh4-E7w","like_count":17,"published_time":"1 month ago"}],"deduped_at":"2026-10-25T20:45:32+00:00"}