I hope you can see this because I'm going to try and simulate what a merge sort does. I've got eight things I want to sort here, and those initially start out here at top level.
我希望你们认真看,因为我要尝试着模拟出归并排序的操作过程,这里我有八个元素进行排序,第一步是将它们分成两半,对吗?
If I want the values two, six and eight in there, I would do an insert of two into that set, an insert of six into that set, and an insert of eight into the set.
如果我想让值2,6,8在那个位置,我会把2插入到那个集合中,把6插入到那个集合中,把8插入到那个集合中。
应用推荐