How to compute the absolute minimum amount of changes to convert one sortorder into another?

后端 未结 8 678
走了就别回头了
走了就别回头了 2021-02-04 06:04

Goal

How to encode the data that describes how to re-order a static list from a one order to another order using the minimum amount of data possible?

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-04 07:02

    If you are truly trying to minimize every bit of data going over the wire, how are you transmitting your data? For example, are you compressing it somehow? Using a 32 bit number for sort order is probably overkill if you only have a few thousand items. 16 bits gets you 65000 items for half the $$$. Same goes for the unique ID's.

提交回复
热议问题