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.
A town contains a total of 5000 houses. Every house owner has to pay tax based on value of the house. Houses over $200 000 pay 2% of their value in tax, houses over $100 000 pay 1.
Q. Write down an algorithm to test whether a Binary Tree is a Binary Search Tree. A n s . The algorithm to check whether a Binary tree is as Binary Search
write a COBOL program to find the biggest of two numbers
adjacency multilist
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
Two-dimensional array is shown in memory in following two ways: 1. Row major representation: To achieve this linear representation, the first row of the array is stored in th
for (i = 0; i sequence of statements } Here, the loop executes n times. Thus, the sequence of statements also executes n times. Since we suppose the time complexity of th
prove that n/100=omega(n)
What is bubble sort? Bubble Sort: The basic idea in bubble sort is to scan the array to be sorted sequentially various times. Every pass puts the largest element in its corr
bst for 40,60,25,50,30,70,35,10,55,65,12
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