12416 - Excessive Space Remover


Difficulty : trivial

Solution Description :

Ad hoc Math problem

Find max space
A*very**big****joke. -> Here max space = 4
*********Goodbye! -> Here max space = 9

For 8 space
1 2 3 4 5 6 7 8 
\ / \ / \ / \ /
 1   2   3   4   --->Action One
  \ /     \ /
   1       2     --->Action Two
    \     /
     \   /
       1         --->Action Three

For 4 you need 2 action
So, max space = 2^n 
Now you need to find ans of n
You can use both side log for solve this equation