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. Reverse the order of the elements on a stack S (i) by using two additional stacks (ii) by using one additional queue. Ans : L e t S be the stac
When there is requirement to access records sequentially by some key value and also to access records directly by the similar key value, the collection of records may be organized
Can a Queue be shown by circular linked list with only single pointer pointing to the tail of the queue? Yes a Queue can be shown by a circular linked list with only single p
The following formula is used to calculate n: n = x * x/(1 - x) . Value x = 0 is used to stop algorithm. Calculation is repeated using values of x until value x = 0 is input. There
How sparse matrix stored in the memory of a computer?
since the gregorian calendar was introduced in 1752,a leap year occurs every 4 years.you are to write a pseudo code to find out whether a year is a leap year.your progrm should dis
The below formula is used to calculate n: n = (x * x)/ (1 - x). Value x = 0 is used to stop the algorithm. Calculation is repeated using values of x until value x = 0 is input. The
W h at are the different ways by which we can represent graph? Represent the graph drawn below using those ways. T he d iff e r e nt w a y s by
Write a recursive function the computes the number of digits in a positive integer n. For example if n = 6598, the function should return 4. Find a variant expression and a thresho
Stacks are often used in evaluation of arithmetic expressions. An arithmetic expression contains operands & operators. Polish notations are evaluated through stacks. Conversions of
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