Aspire Faculty ID #19340 · Topic: UGC NET Computer Science Dec 2018 (Paper II) · Just now
UGC NET Computer Science Dec 2018 (Paper II)

The elements $42,25,30,40,22,35,26$ are inserted one by one in the given order into a max-heap. The resultant max-heap is stored in an array implementation as:

Solution

Insert elements one by one into max-heap.

After inserting $42,25,30$:

$\langle 42,25,30\rangle$

Insert $40$.

Since $40>25$, swap them:

$\langle 42,40,30,25\rangle$

Insert $22$:

$\langle 42,40,30,25,22\rangle$

Insert $35$.

Since $35>30$, swap them:

$\langle 42,40,35,25,22,30\rangle$

Insert $26$.

No swap is needed.

Final max-heap array is

$\langle 42,40,35,25,22,30,26\rangle$

Previous 10 Questions — UGC NET Computer Science Dec 2018 (Paper II)

Nearest first
1
The solution of recurrence relation $T(n)=2T(\sqrt{n})+\lg(n)$ is:
Topic: UGC NET Computer Science Dec 2018 (Paper II)
2
If a graph $G$ has no loops or parallel edges, and if the number of vertices $n$ in the graph is $n\geq 3$, then graph …
Topic: UGC NET Computer Science Dec 2018 (Paper II)
3
Consider a system with $2$ level cache. Access times of Level $1$ cache, Level $2$ cache and main memory are $0.5$ ns, …
Topic: UGC NET Computer Science Dec 2018 (Paper II)
4
Consider a disk pack with $32$ surfaces, $64$ tracks and $512$ sectors per track. $256$ bytes of data are stored in a b…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
5
Find the Boolean expression for the logic circuit shown below: $(1-\text{NAND gate},\ 2-\text{NOR gate},\ 3-\text{NOR g…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
6
The decimal floating point number $-40.1$ represented using IEEE-754 $32$-bit representation and written in hexadecimal…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
7
Consider the following x86 assembly language instructions: MOV AL, $153$ NEG AL The contents of the destination registe…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
8
A computer uses a memory unit with $256K$ words of $32$ bits each. A binary instruction code is stored in one word of m…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
9
Consider the following statements: $(i)$ Auto increment addressing mode is useful in creating self-relocating code. $(i…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
10
Consider the graph shown below : Use Kruskal's algorithm to find the minimum spanning tree of the graph. The weigh…
Topic: UGC NET Computer Science Dec 2018 (Paper II)

Next 10 Questions — UGC NET Computer Science Dec 2018 (Paper II)

Ascending by ID
1
Consider two sequences $X$ and $Y$:$X=\langle 0,1,2,1,3,0,1\rangle$$Y=\langle 1,3,2,0,1,0\rangle$ The length of longe…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
2
Consider the following postfix expression with single-digit operands: $6\ 2\ 3\ *\ /\ 4\ 2\ *\ +\ 6\ 8\ *\ -$ The top t…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
3
A binary search tree is constructed by inserting the following numbers in order:$60,25,72,15,30,68,101,13,18,47,70,34$ …
Topic: UGC NET Computer Science Dec 2018 (Paper II)
4
In a ternary tree, the number of internal nodes of degree $1,2$ and $3$ is $4,3$ and $3$ respectively. The number of le…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
5
Match List I with List II and choose the correct answer from the code given below. List I …
Topic: UGC NET Computer Science Dec 2018 (Paper II)
6
In KK-coloring of an undirected graph G=(V,E)G=(V,E), c:V→{0,1,…,K−1}c:V→{0,1,…,K−1} such that c(u)…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
7
Consider a singly linked list. What is the worst case time complexity of the best-known algorithm to delete the node $a…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
8
The second smallest of $n$ elements can be found with __________ comparisons in the worst case.
Topic: UGC NET Computer Science Dec 2018 (Paper II)
9
Let $r=a(a+b)^*$, $s=aa^*b$ and $t=a^*b$ be three regular expressions. Consider the following: (i) $L(s)\subseteq L(r)$…
Topic: UGC NET Computer Science Dec 2018 (Paper II)
10
Consider the language $L$ given by $L={2^{nk}\mid k>0,\ n \text{ is a non-negative integer}}$ The minimum number of …
Topic: UGC NET Computer Science Dec 2018 (Paper II)
Ask Your Question or Put Your Review.

loading...