Tuesday 13 September 2016

Algorithm Infix to postfix conversation

Infix to Postfix Baner

Postfix expression evolution is task for computer not for human. We deal with infix expression in our daily life.  Where we take care about operator priority etc which untimely need some more consideration for solve an expression if computer will follow infix expression as calculation then it need more time for getting priority operation.

So postfix is a solution where all bracket are removed.  One advantage that postfix has over infix is that it is very easily implemented and does not have overhead of parentheses. Evaluating an expression in postfix notation requires scanning from left to right so you know what to do as soon as you encounter an operator in the expression string. Also, with postfix there is no complication of precedence of one operator over the other.
In any language, arithmetic operation is support is needed which is same as mathematical expression. But writing data structure for understanding arithmetic expression has so many complications. Like scanning direction, operations priority and after that how to decide the priority if any parenthesis is coming. So designing compiler for any language has a need to take care of these complications. But support of arithmetic expressions one of basic requirement of any language. Let us take an arithmetic expression 

a+b/3
Suppose a=0 and b=6. suppose we are diving operation first then add. So the resultant value will be

Monday 12 September 2016

NIELIT A Level July, 2013 A6-R4: DATA STRUCTURES THROUGH ‘C++’

NIELIT A Level July, 2013
A6-R4: DATA STRUCTURES THROUGH ‘C++’


PART ONE
(Answer all the questions)

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)

1.1 Given the sequence of numbers: 13, 52, 95, 26, 38
The sequence after the 3rd iteration of insertion sort is:
A) 13, 26, 52, 95, 38
B) 13, 52, 95, 26, 38
C) 13, 26, 38, 52, 95
D) 13, 26, 52, 95, 38
1.2 Given the following unbalanced tree:
Q
M
N
P
O
R

NIELIT A Level January, 2014 A6-R4: DATA STRUCTURE THROUGH C++

NIELIT A Level January, 2014
A6-R4: DATA STRUCTURE THROUGH C++

PART ONE
(Answer all the questions)

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)

1.1 If given data is already in sorted then it will be a worst case of
A) Bubble sort
B) Selection sort
C) Insertion sort
D) Quick sort
1.2 Advantage of doubly linked list over singly linked list is in
A) Addition at head
B) Addition at tail
C) Deletion at head
D) Deletion at tail