Study Viral (Java Tutorials For Beginners - Step By Step)
  • Home
  • Java Tutorials
    • Core Java
    • Java Swing
    • MS Access JDBC Java Application
  • Facebook Page
  • Programs
    • C Programs
    • C++ Programs
    • Java Programs
    • Python Programs
  • UGC NET
  • Home
  • Java Tutorials
    • Core Java
    • Java Swing
    • MS Access JDBC Java Application
  • Facebook
  • Programs
    • C Programs
    • C++ Programs
    • Java Programs
    • Python Programs
  • UGC NET
Showing posts with label Data Structure. Show all posts
Showing posts with label Data Structure. Show all posts

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 29)

 October 25, 2018     Computer Science And Applications Paper-II, Data Structure, UGC NET JULY 2018     No comments   

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 29)



Q 29. A 5-ary tree is tree in which every internal node has exactly 5 children. The number of left leaf nodes in such a tree with 8 internal nodes will be :
 
(1) 30
(2) 33
(3) 45
(4) 125

 Answer: (2) 33

In a complete n-ary tree, L=(n−1)∗I+1   where L = No. of leaves, I = No. of Internel nodes

Here n = 5, I = 8

Therefore,  L = (5-1) * 8 + 1 = 4 * 8 + 1 = 33


In graph theory, a k-ary tree is a rooted tree in which each node has no more than k children. It is also sometimes known as a k-way tree, an N-ary tree, or an M-ary tree. A binary tree is the special case where k=2.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 28)

 October 24, 2018     Computer Science And Applications Paper-II, Data Structure, UGC NET JULY 2018     No comments   

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 28)



Q 28. The maximum number of comparisons needed to sort 9 items using radix sort is (assume each item is 5 digit octal number) :


(1) 45
(2) 72
(3) 360
(4) 450

Answer: (3) 360

Solution : Here we have octal number i.e. 8

So, its of 5 digit, therefore 5 x 8

Now 5 x 8 x 9 = 360.
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 27)

 October 24, 2018     Computer Science And Applications Paper-II, Data Structure, UGC NET JULY 2018     No comments   

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 27)



27. Match the following with respect to algorithm paradigms :

List - I
List - II

(a) The 8-Queen's Problem
(b) Single-Source shortest paths
(c) STRASSEN's Matrix multiplication
(d) Optimal binary search trees

(i)     Dynamic programming
(ii)    Divide and conquer
(iii)   Greedy approch
(iv)   Backtracking
 


             (a)           (b)          (c)          (d)

(1)         (iv)          (i)           (iii)          (ii)

(2)         (iv)         (iii)           (i)           (ii)

(3)         (iii)          (iv)          (ii)          (i)

(4)         (iv)         (iii)          (ii)          (i) 


Answer :  4.    (iv)         (iii)          (ii)          (i)


 
 
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 26)

 October 24, 2018     Binary Tree, Computer Science And Applications Paper-II, Data Structure, UGC NET JULY 2018     1 comment   

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 26)



Q 26. A binary search tree in which every non-leaf node has non-empty left and right sub-trees is called a strictly binary tree. Such a tree with 19 leaves :
  1. cannot have more than 37 nodes
  2. has exactly 37 nodes
  3. has exactly 35 nodes
  4. cannot have more than 35 nodes
 Answer : 2). has exactly 37 nodes

Reason : 
If every non-leaf node in a binary tree has nonempty left and right subtrees, the tree is termed a strictly binary tree. Or, to put it another way, all of the nodes in a strictly binary tree are of degree zero or two, never degree one. A strictly binary tree with N leaves always contains 2N – 1 nodes. 

Now we have 19 leaves, Therefore  (2 x 19) - 1 =  38 - 1 = 37
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 25)

 October 24, 2018     Binary Tree, Computer Science And Applications Paper-II, Data Structure, UGC NET JULY 2018     No comments   

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 25)



Q 25. A text is made up of the characters a, b, c, d, e each occurring with the probability 0.08, 0.40,     0.25, 0.15 and 0.12 respectively. The optimal coding technique will have the average length of:

  1. 2.4
  2. 1.87
  3. 3.0
  4. 2.15 

 Answer: 4). 2.15
Solution:
 

Given 0.08 + 0.40 + 0.25 + 0.15 + 0.12 = 1




B : 0
C : 1 0
D : 1 1 0
A : 1 1 1 0
E : 1 1 1 1 1

Now,  B consume single bit, C consume 2 bits, D consume 3 bits, A and E consume 4 bits

Avg length = 4∗(A)+1∗(B)+2∗(C)+3∗(D)+4∗(E)
 
Avg length = 4∗(0.08)+1∗(0.4)+2∗(0.25)+3∗(0.15)+4∗(0.12)= 2.15
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 24)

 October 15, 2018     Computer Science And Applications Paper-II, Data Structure, Graph-Algorithms, UGC NET JULY 2018     No comments   

UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 24)


Q 24. Which of the following algorithms solves the single-source shortest paths?
  1. Prim's algorithm
  2. Floys-Warshall algorithm
  3. Johnson's algorithm
  4. Dijkstra's algorithm
Answer : 4. Dijkstra's algorithm

Solution:
  1. Prim's algorithm => Min Cost spanning tree
  2. Floys-Warshall algorithm => All pair shortest path
  3. Johnson's algorithm =>  All pair shortest path
  4. Dijkstra's algorithm => Single source shortest path
Read More
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Older Posts Home

Facebook

StudyViral

Labels

Alphabet Pattern Binary Tree BLOB (Binary Large Object) Computer Networks Computer Science And Applications Paper-II Data Structure DBMS Digital Clock Digital Watch Extra Tutorials File Upload Find Age from Date of Birth Graph-Algorithms Java and J2EE web applications JAVA JDK 12 Java Mail API Java MySQL Java Programs Java Programs List Java Servlets Java Swing Java Swing With MySQL Database Java Tutorials JCalender KVS Compuer Science - January 2017 Question Paper MS Access JDBC Java Application Multiuser Login NETBEANS 11 IDE Occurrence of Digits in Number Operation System Pattern Program Reverse of String Sending Email Servlet Servlet Tutorial Software Engineering Star Struts 2 FrameWork Struts 2 Registration Form UGC NET JULY 2018 Windows Commands

Popular Posts

  • Install NetBeans 11 IDE on Windows 10 - Study Viral
    Install NetBeans 11 IDE on Windows 10 - Study Viral How to Install NetBeans 11 IDE on Windows 10. Download Link : https://netbeans...
  • UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 51-53)
    UGC NET JULY 2018 (Computer Science And Applications Paper-II) (Question 51-55) Q 51. At a particular time of computation, the value ...
  • Program 01: Write a program to display/print your name.
     Program 01 - Write a program to display/print your name. This is a very basic and introductory program in Java. You might see similar p...

Categories

  • Alphabet Pattern (13)
  • Binary Tree (2)
  • BLOB (Binary Large Object) (1)
  • Computer Networks (2)
  • Computer Science And Applications Paper-II (40)
  • Data Structure (6)
  • DBMS (1)
  • Digital Clock (1)
  • Digital Watch (1)
  • Extra Tutorials (3)
  • File Upload (1)
  • Find Age from Date of Birth (1)
  • Graph-Algorithms (1)
  • Java and J2EE web applications (3)
  • JAVA JDK 12 (1)
  • Java Mail API (3)
  • Java MySQL (5)
  • Java Programs (44)
  • Java Programs List (3)
  • Java Servlets (3)
  • Java Swing (16)
  • Java Swing With MySQL Database (4)
  • Java Tutorials (37)
  • JCalender (1)
  • KVS Compuer Science - January 2017 Question Paper (6)
  • MS Access JDBC Java Application (6)
  • Multiuser Login (1)
  • NETBEANS 11 IDE (1)
  • Occurrence of Digits in Number (1)
  • Operation System (4)
  • Pattern Program (8)
  • Reverse of String (2)
  • Sending Email (1)
  • Servlet (3)
  • Servlet Tutorial (3)
  • Software Engineering (4)
  • Star (7)
  • Struts 2 FrameWork (2)
  • Struts 2 Registration Form (1)
  • UGC NET JULY 2018 (40)
  • Windows Commands (2)

Pages

  • Java Tutorials
  • ASP.NET (in Hindi)
  • Java Programs List

Blog Archive

  • ▼  2021 (3)
    • ▼  April 2021 (3)
      • Program 03: Write a program to show the use of Dat...
      • Program02: Write a program to Add Two Integers.
      • Program 01: Write a program to display/print your ...
  • ►  2019 (7)
    • ►  June 2019 (1)
    • ►  May 2019 (2)
    • ►  March 2019 (4)
  • ►  2018 (111)
    • ►  November 2018 (7)
    • ►  October 2018 (20)
    • ►  September 2018 (10)
    • ►  August 2018 (3)
    • ►  July 2018 (19)
    • ►  June 2018 (5)
    • ►  May 2018 (2)
    • ►  April 2018 (3)
    • ►  March 2018 (11)
    • ►  February 2018 (18)
    • ►  January 2018 (13)
  • ►  2017 (36)
    • ►  December 2017 (10)
    • ►  November 2017 (9)
    • ►  October 2017 (7)
    • ►  September 2017 (10)

About Me

Rohit Basra
Hello guys my name Rohit Basra. I love to code and teach java language.
View my complete profile

Followers

Copyright © Study Viral (Java Tutorials For Beginners - Step By Step) | Powered by Blogger