Please select a subject first
Advertisements
Advertisements
Answer the following question on the diagram of a Binary Tree given below:

State the degree of the nodes C and G. Also, state the level of these nodes when the root is at level 0.
Concept: undefined >> undefined
Answer the following question on the diagram of a Binary Tree given below:

Write the pre-order and post-order traversal of the above tree structure.
Concept: undefined >> undefined
Advertisements
What is the importance of the reference part in a Linked List?
Concept: undefined >> undefined
Answer the following questions from the diagram of a Binary Tree given below:

- Write the pre-order traversal of the above tree structure.
- Name the parent of the nodes D and B.
- State the level of nodes E anf F when the root is at level 0.
Concept: undefined >> undefined
Answer the following questions based on the diagram of a Binary Tree given below:

- Name the external nodes of the tree.
- State the degree of node M and node L.
- Write the post-order traversal of the above tree structure.
Concept: undefined >> undefined
A linked list is formed from the objects of the class Node. The class structure of the Node is given below:
class Node
{
int n;
Node link;
}
Write an Algorithm OR a Method to search for a number from an existing linked list. The method declaration is as follows:
void FindNode( Node str, int b)
Concept: undefined >> undefined
Answer the following questions from the diagram of a Binary Tree given below:

- Name the root of the left sub tree and its siblings.
- State the size and depth of the right sub tree.
- Write the in-order traversal of the above tree structure.
Concept: undefined >> undefined
Write the minterm of F(A, B, C, D) when A = 1, B = 0, C = 0 and D = 1.
Concept: undefined >> undefined
For Big O notation, state the difference between O(n) and O(n2 ).
Concept: undefined >> undefined
The ability of an object to take many forms is known as ______.
Concept: undefined >> undefined
Design a class NumDude to check if a given number is a Dudeney number or not. (A Dudency number is a positive integer that is a perfect cube, such that the sum of its digits is equal to the cube root of the number.)
Example 5832 = (5 + 8 + 3 +2)3 = (18)3 = 5832
Some of the members of the class are given below:
| Class name | unique |
| Data member/instance variable: | |
| num | to store a positive integer number |
| Methods/Member functions: | |
| NumDude() | default constructor to initialise the data member with a legal initial value |
| void input() | to accept a positive integer number |
| int sumDigits(int x) | returns the sum of the digits of number 'x' using recursive technique |
| void isDude() | checks whether the given number is a Dudeney number by invoking the function sumDigits() and displays the result with an appropriate message. |
Specify the class NumDude giving details of the constructor ( ), void input( ), intsumDigits(int) and void is Dude(). Define a main() function to create an object and call the functions accordingly to enable the task.
Concept: undefined >> undefined
A class Trans is defined to find the transpose of a square matrix. A transpose of a matrix is obtained by interchanging the elements of the rows and columns.
Example: If size of the matrix = 3, then
| ORIGINAL | ||
| 11 | 5 | 7 |
| 8 | 13 | 9 |
| 1 | 6 | 20 |
| TRANSPOSE | ||
| 11 | 8 | 1 |
| 5 | 13 | 6 |
| 7 | 9 | 20 |
Some of the member of the class are given below:
| Class name | Trans |
| Data members/instance variables: | |
| arr[ ] [ ] | to store integers in the matrix |
| m | integer to store the size of the matrix |
| Methods/Member functions: | |
| Trans(int mm) | parameterised constructor to initialise the data member m = mm |
| void fillarray( ) | to enter integer elements in the matrix |
| void transpose( ) | to create the transpose of the given matrix |
| void display( ) | displays the original matrix and the transposed matrix by invoking the method transpose( ) |
Specify the class Trans giving details of the constructor( ), void fillarray( ), void transpose( ) and void display( ). Define a main ( ) function to create an object and call the functions accordingly to enable the task.
Concept: undefined >> undefined
If (~p ⇒ ~q), then its contrapositive will be ______.
Concept: undefined >> undefined
The dual of (X' + 1) · (Y' + 0) = Y' is ______.
Concept: undefined >> undefined
The reduced expression of the Boolean function F(P, Q) = P' · + P · Q is ______.
Concept: undefined >> undefined
With reference to the code given below, answer the questions that follow along with dry run/working.boolean num(int x)
{ int a=1}
for (int c=x; c>0; c/<10}
a*=10;
return (x*x%a)=x;
}
- What will the function num() return when the value of x = 25?
- What is the method num() performing?
Concept: undefined >> undefined
According to the Principle of duality, the Boolean equation
(A+ B') • (A+ 1) =A+ B' will be equivalent to ______.
Concept: undefined >> undefined
Verify if the following proposition is a Tautology, Contradiction or Contingency using a truth table.
((A => B)^(B => C))=>(A => C)
Concept: undefined >> undefined
Find the complement of the following expression and reduce it by using Boolean laws.
P•( 13 ± Q)•Q•(Q+R')
Concept: undefined >> undefined
How is a decoder different from a multiplexer?
Concept: undefined >> undefined
