While helping my 5th grader kid, I came across a question from his math text book about using parenthesis to evaluate the expression.<p>The questions and examples were simple enough for fifth grader but the generalization of the same seems like a hard problem.<p>Here is the problem when generalized:<p>1. You are given an equation of the form LHS = RHS.<p>2. LHS is a mathematical expression on real numbers with +, -, * and / operations.<p>3. RHS is a single numerical value (real number).<p>4. LHS != RHS<p><i></i>Given above, modify the LHS such that by adding one or more groups of parenthesis, LHS == RHS.<i></i><p>Find the Big O time complexity for the algorithm<p>Example 1<p><i></i>Input<i></i><p>200 - 60 / 5 = 28<p><i></i>Output<i></i><p>(200 - 60)/5 = 28<p>Example 2<p><i></i>Input<i></i><p>12 + 3 * 17 - 3 * 2 = 108<p><i></i>Output<i></i><p>(12 + 3 * (17 - 3)) * 2 = 108<p>Hoping to start a thread discussing the solutions