Data Structures Aptitude interview questions

[quote]What is the data structure?[/quote]

A data structure is a way of organizing data that considers not only the items stored but also their relationship to each other. Advance knowledge about the relationship between data items allows the designing of efficient algorithms for the manipulation of data.

[quote]List out real-time applications of data structures?[/quote]

  • Designing of compilers
  • Operating systems designs
  • Database management systems
  • Statistical analysis
  • Graphs
  • Numerical Analysis
  • Artificial Intelligence
  • Simulation

[quote]What type of data structure used in RDBMS?[/quote]

 RDBMS – Array (i.e. Array of structures)

[quote]What type of data structure used in the Network data model?[/quote]

Network data model – Graph

[quote]What type of data structure used in the Hierarchical data model?[/quote]

Hierarchical data model – Trees

[quote]How many minimum numbers of queues are required to implement the priority queue?[/quote]

Two. One queue is used for actual storing of data and another for storing priorities.

[quote]Convert this expression  ((A + B) * C – (D – E) ^ (F + G)) to equivalent Prefix and Postfix notations.[/quote]

  • Prefix Notation: ^ – * +ABC – DE + FG
  • Postfix Notation: AB + C * DE – – FG + ^

[quote]

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

  • Insertion
  • Selection
  • Exchange
  • Deletion

[/quote]

Using insertion we can perform insertion sort, using selection we can perform selection sort, using exchange we can perform the bubble sort (and other similar sorting methods). But no sorting method can be done just using deletion.

[quote]What type of pointer needs to use for a heterogeneous linked list?[/quote]

The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing the pointer to any type as it is a generic pointer type.

[quote]Which data structures used to perform recursion?[/quote]

Stack. Because of its LIFO (Last In First Out) property, it remembers its ‘caller’ so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls.

Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.

[quote]Which notations are used in the evaluation of arithmetic expressions using a prefix and postfix forms?[/quote]

Polish and Reverse Polish notations.

Fresher Data Structures Aptitude interview questions

[quote]A binary tree with 10 nodes then how many null branches exist?[/quote]

It should contain 11 null branches.

Let us take a tree with 5 nodes (n=5)

It will have only 6 (ie,5+1) null branches. In general, A binary tree with n nodes has exactly n+1 null nodes.

[quote]What are the methods available in storing sequential files?[/quote]

  • Straight merging
  • Natural merging
  • Polyphase sort
  • Distribution of Initial runs

[quote]List out a few of the real-time application of tree data-structure?[/quote]

  • For manipulation of Arithmetic expression
  • Symbol Table construction
  • Syntax analysis.

[quote]List out a few of real-time applications for multilinked structures?[/quote]

Sparse matrix, and index generation.

[quote]Which data structure is suitable to implement trees?

  • Array
  • Linked list
  • Stack
  • Queue 

[/quote]

The linked list is used to implement a tree data structure

[quote]Which algorithm used in solving the 8 Queens problem?[/quote]

Backtracking algorithm used to solve queens problems

[quote]What should be the condition to balance an AVL tree?[/quote]

If the ‘pivotal value‘ or the ‘height factor’ is greater than 1 or less than –1.

Leave a Reply

Your email address will not be published. Required fields are marked *