Amazon Interview Question: Devise an eval() method f... | Glassdoor

Interview Question

Software Engineer Interview

Devise an eval() method for numerical expressions such

  as + x - / given a string containing brackets and parenthesis. I.E. "(3 * 6) + [(2/4) - 1]"
Answer

Interview Answer

1 Answer

0

Just use two stacks to implement the question, one for numbers, and the other is for operators.

Nova on Aug 6, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.