Description
SESSION | OCT 2024 |
PROGRAM | MASTER OF COMPUTER APPLICATIONS (MCA) |
SEMESTER | II |
COURSE CODE & NAME | DCA6202 ADVANCED DATA STRUCTURE |
Set-I
- What is data structure? Explain various types of data structure in detail.
Ans 1.
A data structure is a way of organizing and storing data in a computer so that it can be accessed and manipulated efficiently. It provides a systematic way of managing large amounts of data to perform various operations such as searching, sorting, insertion, deletion, and updating. Data structures are fundamental to programming and software development as they form the basis for designing efficient algorithms.
Linear Data Structures
Linear data structures are those in which data elements are arranged sequentially, and each element is connected to its previous and next element. These structures are simple and easy to implement. Examples include:
- Array: An array is a collection of elements stored at contiguous memory locations. It allows random access to elements but has a fixed size, which is a limitation.
- Linked List: A linked list consists of nodes where each node contains a data element and
Its Half solved only
Buy Complete assignment from us
Price – 190/ assignment
MUJ Manipal University Complete SolvedAssignments session JULY-AUG 2024
buy cheap assignment help online from us easily
we are here to help you with the best and cheap help
Contact No – 8791514139 (WhatsApp)
OR
Mail us- [email protected]
Our website – www.assignmentsupport.in
- What do you mean by linked list? Write a function to insert and delete a node in linked list.
Ans 2.
A linked list is a linear data structure in which elements, called nodes, are linked using pointers. Each node contains two parts: the data and a pointer to the next node. Linked lists are dynamic, meaning they can grow or shrink in size during execution, unlike arrays. They are particularly useful when frequent insertions and deletions are required, as these operations are more efficient compared to arrays.
Types of Linked Lists
- Singly Linked List: In this type, each node points to the next node, forming a
- Write Short note on following: –
- a) AVL Tree b) Expression Tree
Ans 3.
- a) AVL Tree
An AVL tree is a type of self-balancing binary search tree named after its inventors, Adelson-Velsky and Landis. It is designed to maintain a balance factor for every node, ensuring that the difference in height between the left and right subtrees of any node does not exceed one. This property ensures that the tree remains approximately balanced, which guarantees efficient operations like insertion, deletion, and search, all with a time complexity of O(logn)O(\log n
Set-II
- a) What is graph data structure and its representations?
- b) Compare BFS and DFS
Ans 4.
- a) Graph Data Structure and Its Representations
A graph is a data structure that consists of a set of vertices (or nodes) and a set of edges connecting these vertices. Graphs are widely used to model real-world problems, such as social networks, transportation systems, and computer networks, due to their ability to represent relationships between entities.
Graphs can be classified as directed or undirected. In a directed graph, edges have a direction, indicating the flow from one vertex to another. In contrast, undirected graphs have bidirectional
- Write a procedure for sorting list of elements using Quick sort method.
Ans 5.
Quick Sort is an efficient and widely-used sorting algorithm based on the divide-and-conquer strategy. It works by selecting a pivot element from the list and partitioning the other elements into two sublists: those less than the pivot and those greater than the pivot. The process is recursively applied to the sublists until the entire list is sorted. Quick sort is known for its average-case time complexity of O(nlogn)O(n \log n)O(nlogn), making it faster for large datasets.
Steps in Quick Sort
- Choose a Pivot: The first step in the quick sort algorithm is to select a pivot element from the list. The choice of pivot can significantly affect the algorithm’s performance. Common
- Explain the technique of ‘Hashing’ as an effective searching technique. What are ‘Collisions’? How can they be handled?
Technique of Hashing as an Effective Searching Technique
Hashing is a technique used to store and retrieve data efficiently by mapping keys to specific locations in a data structure, called a hash table. It uses a hash function to convert a key into an index, where the corresponding value is stored. Hashing is particularly effective for applications requiring fast search, insertion, and deletion operations, as it can achieve an average-case time complexity of O(1)O(1)O(1).
How Hashing Works
A hash function takes an input key and produces an integer value, called the hash code, which
Reviews
There are no reviews yet.