0% found this document useful (0 votes)
22 views4 pages

Data Structure 111

hfhb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

Data Structure 111

hfhb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
Top 50 DAES Ts3 Interview Questions & Answers 1) What is data structure? Data structure refers to the way data is organized and manipulated. It seeks to find ways to make data access more efficient. When dealing with the data structure, we not only focus on one piece of data but the different set of data and how they can relate to one another in an organized manner. 2) Differentiate between file and structure storage structure. The key difference between both the data structure is the memory area that is being accessed When dealing with the structure that resides the main memory of the computer system, this is referred to as storage structure. When dealing with an auxiliary structure, we refer to it as file structures. 3) When is a binary search best applied? A binary search is an algorithm that is best applied to search a list when the elements are already in order or sorted. The list is searched starting in the middle, such that if that middle value is not the target search key, it will check to see if it will continue the search on the lower half of the list or the higher half. The split and search will then continue in the same manner. 4) What is a linked list? A linked list is a sequence of nodes in which each nade is connected to the nade following it. This forms a chain-like link for data storage. 5) How do you reference all the elements in a one-dimension array? To reference all the elements in a one -dimension array, you need to use an indexed loop, So that, the counter runs from 0 to the array size minus one. In this manner, You can reference all Multidimensional arrays make use of multiple indexes to store data. It is useful when storing data that cannot be represented using single dimensional indexing, such as data representation in a board game, tables with data stored in more than one column. 14) Are linked lists considered linear or non-linear data structures? Itdepends on where you intend to apply linked lists. If you based it on storage, a linked list is considered non-linear. On the other hand, if you based it on access strategies, then a linked list is considered linear. 15) How does dynamic memory allocation help in managing data? Apart from being able to store simple structured data types, dynamic memory allocation can combine separately allocated structured blocks to form composite structures that expand and contract as needed. 16) What is FIFO? FIFO stands for First-in, First-out, and is used to represent how data is accessed in a queue. Data has been inserted into the queue list the longest is the one that is removed first. 17) What is an ordered list? An ordered list is a list in which each node's position in the list is determined by the value of its key component, so that the key values form an increasing sequence, as the list is traversed. 18) What is merge sort? Merge sort, is a divide-and-conquer approach for sorting the data. In a sequence of data, adjacent ones are merged and sorted to create bigger sorted lists. These sorted lists are then merged again to form an even bigger sorted list, which continues until you have one single sorted list. 19) Differentiate NULL and VOID Null is a value, whereas Void is a data type identifier. A variable that is given a Null value indicates an empty value. The void is used to identify pointers as having no initial size. 20) What is the primary advantage of a linked list? A linked list is an ideal data structure because it can be modified easily. This means that editing a linked list works regardless of how many elements are in the list. 21) What is the difference between a PUSH and a POP? Pushing and popping applies to the way data is stored and retrieved in a stack. A push denotes — The smallest element remaining in the subarray is then located next to subscripts 1 through n-1 and switched with the element at subscript 1, thereby placing the second smallest element in the second position. The steps are repeated in the same manner till the last element. 29) How do signed and unsigned numbers affect memory? In the case of signed numbers, the first bit is used to indicate whether positive or negative, which leaves you with one bit short. With unsigned numbers, you have all bits available for that number. The effect is best seen in the number range (an unsigned 8-bit number has a range 0-255, while the 8-bit signed number has a range -128 to +127. 30) What is the minimum number of nodes that a binary tree can have? A binary tree can have a minimum of zero nodes, which occurs when the nodes have NULL values. Furthermore, a binary tree can also have 1 or 2 nodes. 31) What are dynamic data structures? Dynamic data structures are structures that expand and contract as a program runs. It provides a fiexible means of manipulating data because it can adjust according to the size of the data, 32) In what data structures are pointers applied? Pointers that are used in linked list have various applications in the data structure. Data structures that make use of this concept include the Stack, Queue, Linked List and Binary Tree. 33) Do all declaration statements result in a fixed reservation in memory? Most declarations do, with the exemption of pointers. Pointer declaration does not allocate memory for data, but for the address of the pointer variable. Actual memory allocation for the data comes during run-time. 34) What are ARRAYS? When dealing with arrays, data is stored and retrieved using an index that refers to the element number in the data sequence, This means that data can be accessed in any order. In programming, an array is declared as a variable having a number of indexed elements. 35) What is the minimum number of queues needed when implementing a priority queue? The minimum number of queues needed in this case is two. One queue is intended for sorting priorities while the other queue is used for actual storage of data. 36) Which sorting algorithm is considered the fastest? There are many types of sorting algorithms: quick sort, bubble sort, balloon sort, radix sort, are also referred to as edges or arcs and are used to connect nodes where data can be stored and retrieved. 44) Differentiate linear from a nonlinear data structure. The linear data structure is a structure wherein data elements are adjacent to each other. Examples of linear data structure include arrays, linked lists, stacks, and queues. On the other hand, a non-linear data structure is a structure wherein each data element can connect to more than two adjacent data elements. Examples of nonlinear data structure include trees and graphs. 45) What is an AVL tree? An AVL tree is a type of binary search tree that is always in a state of partially balanced. The balance is measured as a difference between the heights of the subtrees from the root. This self- balancing tree was known to be the first data structure to be designed as such, 46) What are doubly linked lists? Doubly linked lists are a special type of linked list wherein traversal across the data elements can be done in both directions. This is made possible by having two links in every node, one that links to the next node and another one that connects to the previous node. 47) What is Huffman's algorithm? Huffman’s algorithm is used for creating extended binary trees that have minimum weighted path lengths from the given weights. It makes use of a table that contains the frequency of occurrence for each data element. 48) What is Fibonacci search? Fibonacci search is a search algorithm that applies to a sorted array. It makes use of a divide- and-conquer approach that can significantly reduce the time needed in order to reach the target element. 49) Briefly explain recursive algorithm. Recursive algorithm targets a problem by dividing it into smaller, manageable sub-problems. The output of one recursion after processing one sub-problem becomes the input to the next recursive process. 50) How do you search for a target key in a linked list? To find the target key in a linked list, you have to apply sequential search. Each node is traversed and compared with the target key, and if it is different, then it follows the link to the next node. This traversal continues until either the target key is found or if the last node is reached

You might also like