Wednesday 14 September 2016

NIELIT A Level July, 2012 A6-R4: DATA STRUCTURES THROUGH C++

NIELIT A Level July, 2012
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 “tear-off” answer sheet attached to the question paper, following instructions therein. (1x10)

1.1 Krushkal's algorithm is used for finding
A) Sorting
B) Searching
C) Critical Path
D) Minimum Spanning Tree
1.2 Which of the method belong to external sorting?
A) Bucket Sort
B) Multi way Merge
C) Selection Sort
D) Insertion Sort

NIELIT A Level January, 2013 A6-R4: DATA STRUCTURES THROUGH C++

NIELIT A Level  January, 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 “tear-off” answer sheet attached to the question paper, following instructions therein. (1x10)

1.1 If the address of A[1,1] and A[2][1] are 1000 and 1010 respectively and each element
occupies 2 byte of memory, then the array has been stored in
A) row major order
B) column major order
C) matrix major order
D) None of the above
1.2 One difference between a queue and a stack is:
A) Queues require dynamic memory, but stacks do not.
B) Stacks require dynamic memory, but queues do not.
C) Queues use two ends of the structure; stacks use only one.
D) Stacks use two ends of the structure, queues use only one

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