Category Archives: Articles

Example Infix to postfix Conversion Using stacks

Example Infix to postfix conversion

Infix To postfix conversion example
Infix To postfix conversion example

 

In order to understand the example described below you need to be aware of the algorithm associated with this conversion which is described in the link below. Along with the algorithm, the meaning of each term along with c code is given below:- Continue reading Example Infix to postfix Conversion Using stacks

Infix to Postfix conversion using stack algorithm

Infix to postfix conversion algorithm

To understand the concept of infix to postfix conversion concept you need to know the know the meaning of the infix, prefix and postfix. Please go through this article to understand the concept better.

Infix to postfix conversion algorithm
Infix to postfix conversion algorithm
READ  Infix Prefix postfix expressions - datastructures

Before we dive in we need to be aware of a few basic concept used in this algorithm. Continue reading Infix to Postfix conversion using stack algorithm

Infix Prefix postfix expressions – datastructures

Infix prefix postfix expressions

These notations are used because the prefix and postfix expressions are evaluated faster than infix expression (one used by humans) by the computer, especially in compilers. The prefix and postfix expressions do not contain parenthesis.

infix, postfix and prefix expressions
infix  prefix postfix expressions

Infix:

An infix expression is a single letter, or an operator, proceeded by an infix string and followed by another infix string.

eg: A, a*b.

Continue reading Infix Prefix postfix expressions – datastructures

Basic Concept of a stack – Push and pop

Stack

A stack is a data structure which is used for storing data . It can be imagined as a pile of books one above the other. Order of the data is the one which comes last goes out first.

It is called a last-in-first-out (LIFO) collection. This means that the last thing we added (pushed) is the first thing that gets pulled (popped) off. If the last card we put on our stacks of cards was an ace, then the first card we pulled from the top is that same ace.

stack - tilte
Stacks Data structure

Continue reading Basic Concept of a stack – Push and pop

Asymptotic Analysis notation in Data Structures

Asymptotic Notation

There are three types of analysis

  • Worst case
  • Best case
  • Average case

In asymptotic analysis the worst case analysis is considered to be the best analysis. To represent these analysis three types of notations are used in complexity analysis. Continue reading Asymptotic Analysis notation in Data Structures

General Rules in Determining the running time

Asymptotic Analysis

asymptotic

General rules for running time :

1. Loops : The running time of a loop is, the running time of the statements multiplied by the number of iterations. Continue reading General Rules in Determining the running time