Map incrementing integer range to six-digit base 26 max, but unpredictably

前端 未结 8 1397
时光说笑
时光说笑 2020-12-04 22:39

I want to design a URL shortener for a particular use case and type of end-user that I have targetted. I have decided that I want the URLs to be stored internally according

8条回答
  •  臣服心动
    2020-12-04 23:29

    How about an LFSR? The linear feedback shift register is used to generate pseudo-random numbers in a range - the operation is deterministic given the seed value, but it can visit every value in a range with a long cycle.

提交回复
热议问题