@Shilpa: following your proposed algorithm answer to input matrix: 1 1 1 1 1 1 1 1 1 should be 27 but correct answer would be 6. It's an easy task to check out all possible 6 states manually. If you find the seventh way please post it.
On Jul 14, 11:31 pm, Rishabh Maurya <[email protected]> wrote: > It can be done in O(2^n) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
