kind: youtube#commentThread

kind: youtube#comment

textDisplay: Really refreshed my memories on these concepts. How about doing some analysis on real minecraft classes’ codes sometime? That will certainly makes the purpose of using hashset in minecraft even clearer.

authorDisplayName: aquila zyy


textDisplay: Packed full of great info, well done!

textOriginal: Packed full of great info, well done!

authorDisplayName: Rays Works

textDisplay: @Li3 he watches them but he doesnt seem to learn anything. or at least clicks on the video and comments

authorDisplayName: InDestructibleMC

textDisplay: Rays Works I see you on every minecraft video


textDisplay: Very clear explanation! I'm interested to see the next videos to see how it influences minecraft stuff!

authorDisplayName: Nooticus


textDisplay: Wow, great explanation! Thank you very much for doing this video!

authorDisplayName: Vivien Lynn


textDisplay:
Great video! Just wanna add a little bit more details as I'm bored. Haha.

In most cases, hashtables/hashmaps are initialized with the number of slots being a prime. Using composite numbers as slot count is commonly avoided, and I've read books that recommend avoiding powers of 2 at all cost unless certain special algorithm is required and implemented. Doing so is usually the best way to minimize the probability of collisions since modulo is used as array indices. Since traversing through a linked list requires extra computational time, it's crucial to keep the collision rate as low as possible. (Chaining is often the best collision resolving method as others, especially probe sequencing, require some extra codes to deal with collided items even after one of them already being removed.)

BTW your works are amazing! I just subbed. c:


textDisplay:
Thanks, I finally know what hashing and a Hashset is. You have shown me the start of a VERY deep Rabbit hole.

I think this was a good explanation for me and others, which came on contact with programming, bit I think  it is not a good video for People who never Programmed befor. The examples where you computed the index for the Hashset manually was a little exhausting, bit nevertheless, Thanks, I learned something new

authorDisplayName: Google plexian


textDisplay: Data structure lessons in a Minecraft channel!

authorDisplayName: nobody literally


textDisplay: Beautiful explanation. Thanks.

textOriginal: Beautiful explanation. Thanks.

authorDisplayName: Emularis


textDisplay: 22:31 Usually it's bottom left, middle left, top left, the right one below that, then the root node and the same order on the other half. If you insert ascending numbers in that order into it, you can always go left for lower numbers and right for higher numbers. For example, if you insert 123456789 and then search for a 6, then you first see the root node 5, go right, you see 8, go left, 7, go left, 6.

authorDisplayName: FaRo

textDisplay: That is true for sorted sets, however in hash sets there is no particular requirement on the iteration order, so they went for this weird linked structure for the iteration order, and the linking order is different depending on whether a node was added via treeification or added after the tree was formed, and differently again once nodes are removed. All that is a very long way of saying that I judged that order to be too complicated for this video, and in tech mc we don't tend to rely on treeified ordering anyway because of how volatile it is.

authorDisplayName: Earthcomputer


textDisplay: 4:20 Actually actually, your original statement was correct. For example in Java, you can iterate over all the entries in the map, which are these pairs of key+value. So a map is indeed a set of pairs.

textDisplay: @Earthcomputer That's weird. Wouldn't it be more efficient to not have tons of null values?

textDisplay: Internally it's the other way around, the public API misleads ;)


textDisplay: Great video but I think you should've included some of the big Os

authorDisplayName: Nitrousoxide


textDisplay: 12:14 places it in square? #2. Starting from 1, it gets put in the third box. However, the box's counting starts from 0. Some people might assume it starts from one and be confused

authorDisplayName: bean noodle

textDisplay: It may be more confusing if you're not used to 0-indexing, but the modulus operator outputs a value from 0 to (n-1), not from 1 to n, so it makes more sense this way.


textDisplay: Very interesting video thanks!

textOriginal: Very interesting video thanks!

authorDisplayName: Nekzuris


textDisplay:
"Sets are maps with null values"

This seems weird to me. Why waste the memory? Is there a reason or was it just easier to implement this way (i.e. lazy/smart devs)?

authorDisplayName: GMOHeaven

value: UCJnlaVOuFMItvRtaacOMaxw

textDisplay:
Set elements "hash" to a specific index in a collection. It's said that the elements are "null" because they don't actually exist in the collection, they're just "marked" as existing or not. It's useful to NOT store them since it SAVES memory. The purpose of a set is not to keep track of values, but to keep track of a value's existence in a collection.

To answer your second question, Java has their own implementation of a HashSet that Minecraft uses, so it it's really about the Java maintainers' decision, not the devs. Not really lazy or smart, just the most common way to do it

authorDisplayName: kaitlyn tw


textDisplay:
Congratulations! You deserve it! :D
Very interesting video!

no really, it was good video xd

authorDisplayName: kikawet


textDisplay:
Cool i'm the 2000th subscriber

You're to redstone engineers what redstone engineers are to the rest of us ! Best mind that ever played Minecraft !

authorDisplayName: RutilantBossi TV


textDisplay: how do you only have 2k subs? O_O you're pretty much legendary on 2b2t. Great videos!

authorDisplayName: Force Ken

textDisplay: also, the "unbreakable'' items scourge we are currently in, we can thank him for ;)

textDisplay: @TheDutchisGaming he leaked the book dupe glitch, well he was the first source of the program.

textDisplay: Why is he legendary on 2b2t?

textOriginal: Why is he legendary on 2b2t?

authorDisplayName: TheDutchisGaming


textDisplay: I heard that you invented the hashset

textOriginal: I heard that you invented the hashset

authorDisplayName: Matthew Bolan

textDisplay: Lol

textOriginal: Lol


textDisplay: "EA, you owe I"<br>Orf EA shill confirmed

textOriginal:
"EA, you owe I"
Orf EA shill confirmed

authorDisplayName: MaJEllico


textDisplay: This duplication glitch is very complicated and confusing

authorDisplayName: Sped

textDisplay: @ahgqw bassdd its a joke go take your salt elsewhere

authorDisplayName: InDestructibleMC

textDisplay: It's not and go comment on that video, not this

authorDisplayName: ahgqw bassdd


textDisplay: you could have probably just linked to some computer science channels video on hash sets and maps, couldnt you? xD

authorDisplayName: Jendrik Weise

textDisplay: Maybe, but the next video will be more in depth and I dont think there are any computer science vidoes that go that in depth on the java data structures in particular


textDisplay: hElP dTtS brOKe MY moBsWITch

textOriginal: hElP dTtS brOKe MY moBsWITch

moderationStatus: likelySpam


textDisplay: len(hello) is 5 not 4 so *****86%5 == 1 right?

authorDisplayName: Varun Chawla


textDisplay: Very technical and useful for bedrock speedrun

textDisplay: Xd

textOriginal: Xd

authorDisplayName: RandomSnow '


authorDisplayName: EDDxample


textDisplay: Linux! Nice...

textOriginal: Linux! Nice...

authorDisplayName: RedNicStone


textDisplay: hello ilmumbo!

textOriginal: hello ilmumbo!

authorDisplayName: Pe3ak Pe3et


textDisplay: Wtf is this shit. Where is LongOpenHashSet. xd

authorDisplayName: KaptainWutax


textDisplay: Hello allo

textOriginal: Hello allo

authorDisplayName: RedCMD [::]