MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Tree
A
data structure similar to a graph, with no loops.
B
an object in a graph also known as a vertex
C
a join of relationship between nodes-also know as an arc
D
the starting node in a rooted tree structure from which all other nodes branch off./
Explanation: 

Detailed explanation-1: -data structure similar to a graph, with no loops.

Detailed explanation-2: -A tree is a connected graph with no cycles. A forest is a graph with each connected component a tree. A leaf in a tree is any vertex of degree 1.

Detailed explanation-3: -A graph is a set of vertices/nodes and edges. A tree is a set of nodes and edges. In the graph, there is no unique node which is known as root. In a tree, there is a unique node which is known as root.

Detailed explanation-4: -Both Trees and Graphs are types of non−linear data structures. They are different from each other in the context of their types of connections and loop formation. That means, a tree structure is connected such that it can never have loops, whereas a graph structure follows a network model and may have loops.

Detailed explanation-5: -A tree is a data structure that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node whereas a graph is a data structure that consists of a group of vertices connected through edges. Thus, this is the fundamental difference between tree and graph.

There is 1 question to complete.