Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q. By making use of stacks, write an algorithm to determine whether the infix expression has balanced parenthesis or not.
Ans.
Algorithm parentheses is written below
This specific algorithm reads a source program and parses it to make sure all opening -closing parenthesis are systematically paired
1. loop (more data)
read (character)
if (character is not a closing parenthesis)
pushstack ( stack, character)
else
if (character is closing parenthesis)
popstack (stack, token)
while ( token is not an opening paranthesis)
endwhile end if
end if end loop
if (not emptystack (stack))
print (Error: opening parenthesis not matched)
end parseparens.
Q. Write an algorithm INSERT which takes a pointer to a sorted list and a pointer to a node and inserts the node into its correct position or place in the list. Ans: /* s
In this respect depth-first search (DFS) is the exact reverse process: whenever it sends a new node, it immediately continues to extend from it. It sends back to previously explore
Advantages of First in First out (FIFO) Costing Advantages claimed for first in first out (FIFO) costing method are: 1. Materials used are drawn from the cost record in
Explain about the Structured types - Built-In Types Values of the carrier set are not atomic, consisting rather than several atomic values arranged in some way. Common illu
explain deletion and insertion in a queue
1. develop an algorithm which reads two decimal numbers x and y and determines and prints out wether x>y or y>x. the input values, x and y, are whole number > or equal to 0, which
A common person's faith is that a computer can do anything. It is far from truth. In realism computer can carry out only definite predefined instructions. The formal illustration o
The data structure needed to evaluate a postfix expression is Stack
Two linked lists are having information of the same type in ascending order. Write down a module to merge them to a single linked list that is sorted merge(struct node *p, stru
Illustrate an example of algorithm Consider that an algorithm is a sequence of steps, not a program. You might use the same algorithm in different programs, or express same alg
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd