Finding the ranking of a word (permutations) with duplicate letters

前端 未结 6 617
有刺的猬
有刺的猬 2020-11-27 07:09

I\'m posting this although much has already been posted about this question. I didn\'t want to post as an answer since it\'s not working. The answer to this post (Finding th

6条回答
  •  粉色の甜心
    2020-11-27 07:56

    If we use mathematics, the complexity will come down and will be able to find rank quicker. This will be particularly helpful for large strings. (more details can be found here)

    Suggest to programmatically define the approach shown here (screenshot attached below) given below)

提交回复
热议问题