We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
logic is simple there are total m 1's and n 0's now you fix one 1 at starting of the string so you have m-1 1's now we have arrange them m+n-1!/(m-1!)(n!)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Permutations
You are viewing a single comment's thread. Return to all comments →
logic is simple there are total m 1's and n 0's now you fix one 1 at starting of the string so you have m-1 1's now we have arrange them m+n-1!/(m-1!)(n!)