Splaysort is a way to put things in order, like if you had a bunch of toys and you wanted to line them up from smallest to biggest. Splaysort works in this way:
1. You take your toys and throw them all into a big pile.
2. Then you pick one toy from the pile and put it in its proper place in the line (either at the beginning or end). This toy is the "root" of your line.
3. You then look at the next toy in the pile and figure out where it would go in the line if it was added.
4. If you find that the new toy should be added next to the root toy (because it is smaller or bigger, depending on how you're sorting), you "splay" the line. This means that you take the root toy and move it to be the next toy in line after the new toy you just added.
5. Then you look at the third toy in the pile and figure out where it would go in the line if it was added.
6. If it's smaller than the root toy, you "splay" the line again, which means you take the new toy and make it the root, and the current root toy becomes the next toy in line after the new toy.
7. You keep doing this with every toy until all the toys are in the proper order from smallest to biggest.
Splaysort is helpful because it doesn't require you to look at and compare all the toys every time you add a new one. It instead moves the root around to create a more efficient way of adding new toys in order.