{"id":23224024,"url":"https://github.com/junaidsalim/infixtopostfix_cpp","last_synced_at":"2025-04-05T16:44:29.346Z","repository":{"id":216434307,"uuid":"741326562","full_name":"JunaidSalim/InfixToPostfix_cpp","owner":"JunaidSalim","description":"This repo contains that will convert infix expression to postfix and then evaluates it.","archived":false,"fork":false,"pushed_at":"2024-01-17T16:50:56.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T13:52:23.547Z","etag":null,"topics":["cpp","dsa","infixtopostfix","infixtopostfix-expression"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JunaidSalim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-10T06:54:46.000Z","updated_at":"2024-02-11T08:18:54.000Z","dependencies_parsed_at":"2024-01-17T18:34:49.391Z","dependency_job_id":"226d7972-a3ee-408e-9a72-01315ef940b0","html_url":"https://github.com/JunaidSalim/InfixToPostfix_cpp","commit_stats":null,"previous_names":["junaidsalim/infixtopostfix_cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FInfixToPostfix_cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FInfixToPostfix_cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FInfixToPostfix_cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JunaidSalim%2FInfixToPostfix_cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JunaidSalim","download_url":"https://codeload.github.com/JunaidSalim/InfixToPostfix_cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369932,"owners_count":20927927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","dsa","infixtopostfix","infixtopostfix-expression"],"created_at":"2024-12-18T23:29:51.165Z","updated_at":"2025-04-05T16:44:29.323Z","avatar_url":"https://github.com/JunaidSalim.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# InfixToPostfix_Cpp\n\n**Approach:**\nThe code implements a basic calculator/converter that reads an infix expression, converts it to postfix notation, and evaluates the result. It utilizes two custom stack classes, `Stack` for string elements and `IntStack` for double elements.\n\n**Algorithm Used:**\n1. The `Stack` class performs infix to postfix conversion using the Shunting Yard algorithm.\n2. The `IntStack` class handles the evaluation of postfix expressions.\n3. The code uses two stacks to convert infix to postfix and then evaluate the postfix expression.\n\n**Intuition:**\n1. Infix to Postfix Conversion:\n   - The `checkOperator` function categorizes operators and parentheses.\n   - The `InfixToPostFix` method uses two stacks to convert the infix expression to postfix.\n   - It considers operator precedence and handles parentheses.\n\n2. Evaluation of Postfix Expression:\n   - The `Evaluate` method uses a stack to evaluate the postfix expression.\n   - It iterates through the postfix expression, performing operations on operands.\n\n3. Reverse Functionality:\n   - The `reverse` method reverses the order of elements in the stack.\n\n4. User Interaction:\n   - The main function reads an infix expression, displays the infix, converts to postfix, displays postfix, and finally evaluates and displays the result.\n\nThe overall code structure facilitates the step-by-step processing of infix expressions, making it easy to understand and extend.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaidsalim%2Finfixtopostfix_cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunaidsalim%2Finfixtopostfix_cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunaidsalim%2Finfixtopostfix_cpp/lists"}