- Видео 67
- Просмотров 49 137
BitonicDev
США
Добавлен 14 апр 2020
Hi, I'm bitonic589, and I do a programming and cryptography. I make videos on sorting algorithms, programming, and computer science.
I mainly do web development for programming, for example,
This is the website where most of the things I'm coding to code are going to be:
infinitesites.glitch.me/
I mainly do web development for programming, for example,
This is the website where most of the things I'm coding to code are going to be:
infinitesites.glitch.me/
Видео
Merging in-place with Shell Merging
Просмотров 1 тыс.2 месяца назад
Merging in-place with Shell Merging
Bucket sort - What if the amount of buckets is equal to the array size?
Просмотров 1,6 тыс.2 месяца назад
Bucket sort - What if the amount of buckets is equal to the array size?
Shell sort - Average case vs Worst case
Просмотров 2,3 тыс.2 месяца назад
Shell sort - Average case vs Worst case
Sort Visualizer Update - I made it about 1,000,000 times more optimized
Просмотров 5 тыс.2 месяца назад
Sort Visualizer Update - I made it about 1,000,000 times more optimized
Pushing my algorithm visualizer to its limit - 16384 elements
Просмотров 2613 месяца назад
Pushing my algorithm visualizer to its limit - 16384 elements
Merge Sort - Recursive vs Iterative
Просмотров 1,5 тыс.3 месяца назад
Software: svis4.glitch.me/ #mergesort #sortingalgorithm #sortingalgo #sorting
More new features to the sort visualizer + Development of trace sort
Просмотров 4313 месяца назад
More new features to the sort visualizer Development of trace sort
New features to sort visualizer - High Speed Mode + Visualization Fix
Просмотров 1343 месяца назад
New features to sort visualizer - High Speed Mode Visualization Fix
Comparing my sorting algorithm to the fastest comparison algorithms
Просмотров 963 месяца назад
Comparing my sorting algorithm to the fastest comparison algorithms
New Visualization Type - Rainbow Link (or disparity bars)
Просмотров 1863 месяца назад
New Visualization Type - Rainbow Link (or disparity bars)
Update on the channel (and sort visualizer)
Просмотров 1,2 тыс.3 месяца назад
Update on the channel (and sort visualizer)
Sometimes quick sort isn't really quick..
Просмотров 1,4 тыс.3 месяца назад
Sometimes quick sort isn't really quick..
at first i through at the iterative that it was the bubble sort lol
Hmm thats weird
quick heap sort
I kinda think Stalin sort is better
Imagine doing a worst case with bogo
the Quicksort adversary: reversed.
sisyphus be like
Is this the thick of it??
No lol your videos trash stop hating on my content
Dumb partents think this stupid measure is gonna work.
0:31 : It is also insertion's worst case which needs around n^2/2 comparisons too.
how to make custom tiers
sorry I would tell you but arras removed the entire functionality to make these servers 😭
This is not quick sort. seriously
Yea,quicksort looks way different from this,this is probably some sort of random sort that i dont know about…
Okay,i think this is quicksort but with left and left pointers,no right pointers…
gif material
@@duothehybrid 💀
This is actually slow sort now
Heauick Sort
Thanks for making such an awesome program!
thx, if you have any suggestions please comment them bc I have no more ideas to add
@@bitonic589 your videos have inspired me to start a simple visualisation using C++/SDL on my own LSD-256-radix sort implementation! I will comment again if I get any new ideas not already covered. The important line of my radix sort that avoids modulo divisions, and also avoids bit shifts and logical ands is: for ( auto i : input ) { count[ *((uint8_t*)&i + pass) ]++; } Where pass is the least significant byte as the radix. All good fun (as long as machine little endian lol )
@@bitonic589 I just remembered I do have an idea! For the last 10 years or so we have lived in a world where CPU clocks didn't get much faster, but number of processing cores has increased instead. Therefore it might be interesting to try to make some multi threaded sorts to take advantage of all this extra processing power? I appreciate it might not change the visualizations much.
@@paulchamberlain7942 Yes, I have tried this. You can scroll to the bottom to try Parallel merge sort. It utilizes multiple threads to merge multiple subsections at once. However, it is very laggy and I currently can't find any way to fix it, I assume it may just be that an internet browser can only go so far in using CPU resources. Great suggestion though
Why would anyone switch to merge due to a single case that's extremely rare given real life data?
@@Plaer1 ? No, this is common. Real data is often partially sorted in some way, whether that be in ascending or descending order. Quick sort is unreliable, only good for unrealistically random data. It's best to use a hybrid sort like timsort or grailsort
@@bitonic589 real data being sorted backwards isnt very common...but sure
Most developers use introsort also known as std::sort,i think,idk
@@soosboi Yes
no way and hey can you make a vid about belection i made a vid on my channel bout it
@@Ghal00xx what
@@bitonic589i heard you made vids about sorting algorithms before and I made one myself :)
so hows it work
@@ForlornFraudFacade Ok so you make sorted sections of two by compare and swap and then shellsort them with ²exponential gaps
@@bitonic589ok thank
@@bitonic589stability:
no
@@maymaymhm no 👍
Indeed no @bitonic589
Is it trying to solve it solve after solve
idk lol it glitched
Ummmmm... So Sort Good!
??
I think this is called counting sort
@@rka3477 nope different algorithm
Why Did I See Gravels And Rocks At The Top Left Corner Move At The First Place?
idk they forgot to stop moving
Why no likes and comments?
@@Mini-Rusty Idk nobody likes coding channels
Much more efficient than shell sort itself. A reliable and naturally adaptive worst-case n log n algorithm, with very low overhead. 4,096 elements were used in the visualization. There are more efficient ways to do this but they are more complex
It will sort in O(n) time usually, assuming buckets are distributed evenly Though this is a little bit inefficient, because of the overhead of creating each bucket, and the memory used in the process. Using √n buckets is optimal. In my implementation, insertion sort is used as the core algorithm, so that leaves a worst case of O(n^2), but if you use an algorithm like a modified radix sort for each bucket, you can ensure a worst case O(n), which is optimal for a distribution algorithm. Visualizer: svis4.glitch.me Alternative link: svis4.playcode.io (Use if the first link is blocked)
Accidently discovered the worst case. Sounds really cool. I wonder if anyone else has figured this out before? This happens when using the default shell constants (divide the gap by two), because the binary is sorted in a binary reverse (2-ary reverse) A shellsort with knuth, hibbard, ciura.. gap sequences would probably sort this quickly, but I assume there would be a similar pattern for every gap sequence. Visualizer: svis4.glitch.me Alternative link: svis4.playcode.io (Use if the first link is blocked)
Shell proposed this algorithm, with these gaps, in 1959. By 1960, improved gap sequences which avoided precisely this problem were already being proposed - Papernov, Hibbard, etc. Basically, one must avoid a pure geometric sequence with integer base, and these early proposals (up to the early 1980s) were normally for an integer geometric sequence that was offset by a constant; for example, Hibbard's sequence is just the Mersenne numbers, 2^k-1. This includes Knuth's recommendation from the 1970s: (3^k+1)/2, no greater than N/3. Pratt proved that Shell's original sequence had worst-case complexity O(N^2), and that these conventional alternatives were O(N^3/2) worst-case. In 1971 he showed that using the 3-smooth numbers (2^p * 3^q) reduced the asymptotic complexity to O(N log^2 N). However, because this involves a large number of passes over the data, the average-case performance of this version is significantly worse than the conventional sequences. It's still an interesting way to construct a sorting network that has O(log^2 N) layers, so this is still vaguely relevant to parallel computing (eg. on GPUs). The next advance was by Sedgewick, who showed that the sum of two near-geometric sequences yielded better results, both asymptotically and in practice, than a single one as previously used. One such sequence is hilariously easy to compute: start with a=(4 << 2*k) and b=(3 << k), then at each iteration, take gap=a+b+1, then shift a right by 2 and b right by 1. The final entries in this sequence are 8, 3, 1 as the significant bits of a and b are shifted into oblivion. Sedgewick sequences have worst-case O(N^4/3) complexity, which is practically useful up to the millions or even low billions of elements. Most other sequences have been designed for average-case performance, without being formally analysed for worst-case performance. Finding killer inputs for them is quite difficult, though, which suggests that they are robust in practice.
@Kromaatikse I made my own sequence which is approx n log n (improved version of sedgewick)
In-place radix sort
Basically I tried to code introsort but it didn't work
I just saw youtube update in real-time, they changed the comment styling
Okay so basically what I did: - For frames that would be too fast for you to see anyway at that speed, just skip them. Why try to render it at 96,203,103 frames per second when no monitor, or human eye can see it? Also the triangle at the end shows what happens if you set the speed too high. I don't recommend going over 600x Edit: nvm its fixed now
Update: Not really its limit anymore, I optimized it a lot
Realized how much fun I had coding arras servers. I might start doing arras again sometime soon.
*it looked like nothing because it was memory based typing. So it turns invisible and I have to type it from memory
The sort visualizer will keep being developed as long as I can keep finding new sorting algorithms and finding new features to add. Link: svis4.glitch.me/
Trace sort is a sorting algorithm I'm developing. It should be extremely fast for all scenarios. This is the first version. On some inputs, it can reach the lower bound of O(n log n) still, eventually it will be fast for all scenarios.
Nerd
lol 💀 just try it
My brother at the middle of night:
sry I couldnt find a way to fix the sound but im working on a new one which will have better sound
infinitesites.glitch.me/svis3.html * once I think it is finished it wont be an infinitesites link anymore
*My sorting algorithm is queue sort It is still in development
Quick sort is usually fast. but Worst case is O(n^2).
@@TNTSuperMan did you even watch the video
I'm afraid TNTSuperMan is correct. In this case, it looks like the implementation of this Quick has a pivot that is found in a non-random assignment with no comparisons. It is tough to use a system like this since from the left, from the right, or even exactly in the center (with a special input), there is a way for the pivot to not guarantee any additional items in the partition it creates. I am going to guess that this implementation uses an LR pointer partition scheme with a left or right pivot. When it tries to sort, sometimes, either end of the partition scheme would only result in the left pivot being the least or the right pivot being the greatest item. However, the sort doesn't know that until it tries and finds nothing. This is considered a single scan. Abusing the weaknesses of algorithms that have weak strategies is not that difficult. A reversed array tends to kill algorithms that rely on there being some sortedness amidst the unsortedness in the array, which Quicksorts with a left or right pivot traditionally rely on. However, on a reversed array, no sortedness exists. Thus, nothing less than or greater than the pivot, and the algorithm scans a subset of the N items O(N) times, and N * O(N) = O(N^2).
@@PCBoyStudios Bro chill 💀 The title was "Sometimes it isn't" not that it's always slow. Anyways, this implementation uses a classic Lomuto Partition, implementing the standard quicksort. If you look at the quicksort algorithm, you will see my implementation is the standard. The point of the video though, was to show quick sort's weakness, and how in some cases, it is not a reliable algorithm like merge sort or heap sort is.
@@bitonic589 Nope, I just know common sorting algorithms all too well that I can analyze what made it do that.
@@PCBoyStudios Well usually quicksort uses a Lomuto partition, and that's what's used here. You can check out my new sort visualizer if you want, it has dual pivot partitions and random partitions
The bottom array is the unsorted array (the array being sorted) The top array is the sorted array Every element on the bottom is linked to the corresponding element on the top
32:RXZlbnR1YWxseSB5b3Ugd2lsbCBmaWd1cmUgaXQgb3V0 1.0:NETW2IDUOJQXA4DFMQQGS3RAORUGKIDNMF2HE2LY
32:RXZlbnR1YWxseSB5b3Ugd2lsbCBmaWd1cmUgaXQgb3V0 1.0:NETW2IDUOJQXA4DFMQQGS3RAORUGKIDNMF2HE2LY
Sorts (if you wanted to suggest new sorts) 1. Reverse Selection Sort 2. Selection Sort 3. Double Selection Sort 4. Min Heap Sort 5. Max Heap Sort 6. Insertion Sort 7. Shell Sort 8. Bubble Sort 9. Exchange Sort 10. Comb Sort 11. Odd-Even Sort 12. Cocktail Shaker Sort 13. Merge Sort 14. Quick Sort 15. Quick Sort (Dual Pointer) 16. Counting Sort 17. Bogo Sort
Nice vid thanks
best yt vid i ever seen no cap
It's just water 😭
It will be on infinitesites when I think it is ready to be released, after: - Sound is improved - idk
Link
@@AngelinSofya well the link for the one in the video is infinitesites.glitch.me/sortvisualizer.html but that's an old one, I made a newer one which is much better: svis4.glitch.me/
I was trying to make 14hz beta wave binaural beat Did I do it correctly or is there something else I need Also I am adding new stuff to Infinite Sites, this is one of the new websites that's going to be released