Hello All,
Im working on a problem that goes like this -
Implement a function that evaluates an expression consisting of following operands : '(', ')', '+', '-', '*', '/'. Each numbers in the expression could be large (as large as being represented by string of 1000 digits). The '/' (i.e. divide) operand returns the integer quotient.
The test cases go like -
( ( ( 10000000000000000000000001231234448563465435434723854278423 / 1111111111234623874627 ) * 2342384523 + 123124 - 34534534 ) * ( 1231263123242346 + 223423234346 * 234236536 ) )
and could be even longer.
I do not want to use external libraries which are expression evaluators/parsers like JEP and the like.
I was thinking along the lines of BigInteger and then came to know that BigIntegers do not evaluate epressions like Integers do. I also know that parsing is an option where in i would have to simulate the BODMAS behaviour.I would like to know if there is any other way to go about this and if there isnt, would like some pointers on how i could get this implemented.
I am not looking for a readymade solution, just looking for directions to arrive at the solution by myself.