threeal / leetspace

A dedicated workspace and archive for my LeetCode submissions
https://leetcode.com/threeal
MIT License
1 stars 1 forks source link

Solve Problem 640. Solve the Equation #1807

Closed threeal closed 1 week ago

threeal commented 2 weeks ago

This issue suggests solving the problem 640. Solve the Equation. To achieve this, we can parse the given equation to determine the coefficient of x on the left side and the constant on the right side. If the coefficient of x is zero while the constant is not zero, return "No solution"; otherwise, if the constant is zero, return "Infinite solutions."