zgynhqf

I have wrote a article which describes how to deal with a complicate data structure “sortable tree”. See here.

As i said, it is so complicate that cann’t be maintain easily.

 

Now, i have found a new fluent way to sort this tree:”Sorting by Double”.

“Sorting by double “ is more convinient than int, because we could always insert a new number in any two double values. For example:

we can insert 0.5 into 0 and 1.

we can insert 0.25 into 0 and 0.5.

0.0125 between 0 and 0.25.

:)

 

The benefit of this design is that you don’t have to reset the sorting value of old nodes.

 

 

Reference:

层次结构的数据库处理(译文)

Storing Hierarchical Data in a Database

 

分类:

技术点:

相关文章:

  • 2021-11-28
  • 2021-04-12
  • 2021-09-11
  • 2021-07-20
  • 2021-09-11
  • 2021-09-11
  • 2021-05-04
  • 2021-09-11
猜你喜欢
  • 2021-09-11
  • 2021-09-11
  • 2022-01-08
  • 2021-09-11
  • 2021-09-11
  • 2021-09-11
  • 2021-09-11
相关资源
相似解决方案