Skip to content

Instantly share code, notes, and snippets.

@rohan-bansal
rohan-bansal / PostfixCalculator.java
Last active November 12, 2019 03:12
Calculator that converts infix to postfix, then solves.
import java.util.Stack;
import java.lang.*;
public class PostfixCalculator {
private static boolean isOperator(char c) {
return c == '+' || c == '-' || c == '*' || c == '/' || c == '^'
|| c == '(' || c == ')';
}

Keybase proof

I hereby claim:

  • I am rohan-bansal on github.
  • I am rohan_bansal (https://keybase.io/rohan_bansal) on keybase.
  • I have a public key ASC2FRhaea-8ZprQKxutJaTA0m5_nSXwS1gfVdJep5iI2wo

To claim this, I am signing this object: