Basic CS-Data Structures [3i Infotech Placement]: Sample Questions 16 - 19 of 52

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 16

Data Structures
Edit

Describe in Detail

Essay▾

Sorting is not possible by using which of the following methods?

Explanation

Insertion

  • Using insertion we can perform insertion sort.
Insertion Sort Execution

Selection

  • Using selection we can perform selection sort.
Example of Selection Sort

Exchange

  • Using exchange we can perform the bubble sort.
Example of Bubbel Sorting

Deletion

  • No sorting method can done using deletion.

Question 17

Data Structures
Edit

Write in Short

Short Answer▾

List out few of the applications of tree-structure?

Explanation

  • Manipulation of arithmetic expression
  • Symbol table construction
  • Syntax analysis.

Question 18

Data Structures
Edit

Describe in Detail

Essay▾

In the given binary tree, using array we can store the node 4 at which location?

Explanation

Image Shows the Binary Tree
  • At location 6: 1 2 3 -- 4 -- 5
  • This is how array stores the tree: Root LC1 RC1 LC2 RC2 LC3 RC3 LC4 RC4, where LCn means Left Child of node n and RCn means Right Child of node n

Question 19

Data Structures
Edit

Describe in Detail

Essay▾

In an AVL tree, at what condition balancing is done?

Explanation

  • In an AVL tree, if the balance height is greater than 1 or less than 1 balancing is done.
  • AVL tree is a self-balancing binary search tree.
  • The balance height of left and right sub trees cannot be more than one for all nodes.

AVL Rotations

Left rotation

The Left Rotation

Right rotation

The Right Rotation

Left-Right rotation

Left-Right Rotation

Right-Left rotation

Right-Left Rotation

Developed by: