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. Draw the expression tree of the infix expression written below and then convert it intoPrefix and Postfix expressions.
((a + b) + c * (d + e) + f )* (g + h )
Ans:
The expression given is:
The postfix expression obtained is: ((a+b)+c*(d+e)+f)*(g+h) = ((ab+)+c*(de+)+f)*(gh+) = ((ab+)+(cde+*)+f)*(gh+) = ((ab+cde+*+)+f)*(gh+) = (ab+cde+*+f+)*(gh+) =(ab+cde+*+f+gh+*) The prefix expression obtained is: ((a+b)+c*(d+e)+f)*(g+h) = ((+ab)+c*(+de)+f)*(+gh) = ((+ab)+(*c+de)+f)*(+gh) = ((++ab*c+de)+f)*(+gh) = (+++ab*c+def)*(+gh) = (*+++ab*c+def+gh)
The postfix expression obtained is:
((a+b)+c*(d+e)+f)*(g+h)
= ((ab+)+c*(de+)+f)*(gh+)
= ((ab+)+(cde+*)+f)*(gh+)
= ((ab+cde+*+)+f)*(gh+)
= (ab+cde+*+f+)*(gh+)
=(ab+cde+*+f+gh+*)
The prefix expression obtained is:
= ((+ab)+c*(+de)+f)*(+gh)
= ((+ab)+(*c+de)+f)*(+gh)
= ((++ab*c+de)+f)*(+gh)
= (+++ab*c+def)*(+gh)
= (*+++ab*c+def+gh)
What is a height balanced tree? Height Balanced Tree (AVL Tree) An AVL tree is a binary search tree in which the height of the left and right subtree of the root vary by at most
Differentiate between Nonpersistent and 1-persistent Nonpersistent: If the medium is idle, transmit; if the medium is busy, wait an amount of time drawn from a probability dist
Q. Draw the structures of complete undirected graphs on one, two, three, four and five vertices also prove that the number of edges in an n vertex complete graph is n(n-1
Q. Write an algorithm that counts number of nodes in a linked list. A n s . Algo rithm to Count No. of Nodes in Linked List C
Program: Creation of a linked list In the next example, wewill look to the process of addition of new nodes to the list with the function create_list(). #include #includ
bfs and dfs
write a COBOL program to find the biggest of two numbers
Q. Describe the term array. How do we represent two-dimensional arrays in memory? Explain how we calculate the address of an element in a two dimensional array.
include int choice, stack[10], top, element; void menu(); void push(); void pop(); void showelements(); void main() { choice=element=1; top=0; menu()
Q. Calculate that how many key comparisons and assignments an insertion sort makes in its worst case? Ans: The worst case performance occurs in insertion
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