Thread: creating binary tree from postfix notation in c++

  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    1

    creating binary tree from postfix notation in c++

    hello everybody.
    I want to concert postfix notation to binary tree.would u please help me?
    is it possible?if yes would u please describe the algorith?

    example Postfix notation: 3 not 2 or 1 and not
    Formula: ¬ 1 ∧ (2 ∨ ¬3)

    thank u in advance.
    regards,
    iman

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > example Postfix notation: 3 not 2 or 1 and not
    > Formula: ¬ 1 ∧ (2 ∨ ¬3)
    Don't you mean
    3 not 2 or 1 not and

    Shunting-yard algorithm - Wikipedia, the free encyclopedia
    It's probably not what you want, but the references at the end might lead you to something more appropriate.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating a Binary Search Tree
    By paranoidgnu in forum C Programming
    Replies: 1
    Last Post: 07-14-2011, 11:54 AM
  2. creating a binary search tree
    By krishpatel in forum C Programming
    Replies: 6
    Last Post: 12-23-2010, 11:53 PM
  3. Problem in creating binary tree
    By nickman in forum C Programming
    Replies: 2
    Last Post: 08-22-2010, 03:14 AM
  4. Problems creating Binary Tree
    By darren78 in forum C++ Programming
    Replies: 4
    Last Post: 07-13-2010, 06:45 AM
  5. Expression: Convert infix notation to postfix notation.
    By Nutshell in forum C Programming
    Replies: 7
    Last Post: 02-27-2010, 07:44 AM