Skip to content

Instantly share code, notes, and snippets.

@rajeshsubhankar
rajeshsubhankar / evaluate_infix.cpp
Created September 22, 2014 18:09
How to evaluate INFIX expression in C++ , INFIX to POSTFIX and evaluation of POSTFIX in one pass.
#include<bits/stdc++.h>
using namespace std;
bool isChar(string s)
{
if(s.size() >1 ) return false;
switch (s[0]) {
case '+': return true;
@rajeshsubhankar
rajeshsubhankar / check_isomorphic_tree.cpp
Created September 22, 2014 00:29
Check whether 2 binary trees are Isomorphic to each other or not.
#include<bits/stdc++.h>
using namespace std;
struct node
{
int val;
node* left;
node* right;