CNB Crystal DP# Money - 海外理财
m*r
1 楼
1: Given a string S, return minimum number of chars that you can add to its
back to obtain a palindrome. Explain the complexity
2: Write a function to return expected number of tosses of an unbiased or
biased coin until there are m (>= 1) heads in a row,supposing the head
probability in a toss is p: 0 < p <= 1. If the result is not integer, round
it.
back to obtain a palindrome. Explain the complexity
2: Write a function to return expected number of tosses of an unbiased or
biased coin until there are m (>= 1) heads in a row,supposing the head
probability in a toss is p: 0 < p <= 1. If the result is not integer, round
it.