Skip to content

Stack implementation with conversion of Infix expression to Postfix.

Notifications You must be signed in to change notification settings

anserwaseem/infix-to-postfix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

infix-to-postfix

C++ template-based stack implementation with following features;

  • Paramterized constructor
  • getSize, which returns size of the stack.
  • isEmpty, which tells either stack is empty or not.
  • topp, which assigns the top-most value of stack to the given value.
  • push
  • pop

Using stack, following functions are implemented:

  • isBalanced function, which takes a string as paramter and tells either it is balanced or not (by using stack).
  • reverse function, which takes a string as a parameter and returns a reversed string (by using stack).
  • INtoPOST function, which takes a string as a parameter and uses precedence function along with stack to convert the given INFIX expression into POSTFIX espression.