Algorithm to get all possible string combinations from array up to certain length

后端 未结 12 948
攒了一身酷
攒了一身酷 2020-12-01 02:22

What is the best algorithm to get all possible string combinations from a given array with a minimum & maximum length value.

Note: This adds complexity since the

12条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 03:02

    One thing that is for sure is that what ever the algo use for this , the best time complexity for generation of all the numbers is around O((n^m+1)/(n-1)) (Assuming that you are not using any paralleled programming . ) . (Where n is size of array , m is max length .)

    For which any of the above stated algo suits better .

提交回复
热议问题