Download presentation
Presentation is loading. Please wait.
Published byEdward Reeves Modified over 9 years ago
1
Prepared By Ms.R.K.Dharme Head Computer Department
2
Data structure is a branch of computer science. It is basically group of element under one element. It defines a way to store and organize data in computer, so that it can be used efficiently. Data structure includes arrays, linked list, queues, stacks, binary tree, graph, hash table etc. Data structure deals with the knowledge of: 1. how the data should organized? 2. how the flow of data should be control? 3. How the data structure should be organized and implemented?
3
What is data structure? ◦ Data structure deals with representation of data considering not only the element stored but also there relationship also. ◦ For writing an efficient program, a proper data structure should be selected. ◦ Processing and accessing of data should be efficient. Back to questions
4
1. Data structure help us to understand the relationship of one data element with other. 2. Data structure help us to analyze the data in logical and mathematical manner. 3. Data structure help us to Store the data and organized in logical and mathematical manner. 4. Modern days computing problems are complex and large, so there is need to handle large amount of data which is overcome using data structure. 5. The collection of data that may grow and shrink dynamically over time is organized by using various efficient algorithm in data structure Back to questions
5
A method of interpreting Is called data type. Every programming language has its own sets of data types. Back to questions
6
PRIMITIVE DATA TYPES: ◦ It defines how data will be internally represented in, stored and retrieved from the memory. ◦ Some build in types which are commonly used with most programming languages are as follows: i.Int ii.Float iii.Char iv.Double Back to questions
7
USER DEFINED DATA TYPE : ◦ Many programming language provide the facility of defining our own data types and give it a name. ◦ We can also rename existing data type and give it a name. ◦ We can also rename existing data type and give it a user defined name. ◦ EX: typedef, structure, union, enumeration. 1. Typedef : The typedef is used to defined new data items that are equivalent to existing data types. Syntax: typedef data type new datatype; Example: typedef int units; typedef float marks; Back to questions
8
LECTURE 2 Structure: Structure is a collection of data of different data type. Structure is convenient tool for handling a group of logically related data items. Syntax: struct tag-name { Data type member 1; Data type member 2; ……. }; Back to questions
9
Union: Union are borrowed from structure. So that both have same syntax as structure. However, there are major distinction between them are in terms of storage. In structure each member has there own storage where as in union all member has use same location. This implies that, although a union may contain many member of different types, it can handle only one member at a time. Syntax: union item { Int m; Int n;. }; Back to questions
10
Enumeration : Syntax: enum identifier {value 1, value 2…., value n}; The identifier is user –defined enumerated data types which can be used to declare variables that can have one of the value enclosed within the braces.
11
Derived Data Type : ◦ This types are derived or constructed from the fundamental or basic data types. 1. Arrays : Array is a collection of homogenous data items stored in contiguous memory location. Syntax: datatype variable_name[size]; Back to questions
12
Function : syntax of function: return_type fun_name(parameter list) { Local variable declaration; Stmt;. return stmt; } Back to questions
13
ADT stands for abstract data type. Data type is a collection of values and a set of operations on these value. The definition of ADT involves two parts: 1. First the description of the way in which the components are related to each other. 2. Second on the statement of operation that can be performed on elements of ADT. Back to questions
14
Refinement process deals with how the work will be divided into number of functions. It identifies what will be the task of each function. It concentrate on what inputs are to be given and what will be the results. There are four levels of refinement processes: 1. Conceptual or abstract level: 2. Algorithmic or data structure level: 3. Programming or implementation level: 4. Application level: Back to questions
16
Types of operation that can be performed on data structure are: 1. Traversing 2. Searching 3. Inserting 4. Deleting 5. Sorting 6. merging: Back to questions
17
An algorithm is the finite sequence of instruction which can be carried out to solve a particular problem. EX: Largest of two number: step 1: read the two number A and B. step 2: if A>B then print A is largest goto step 4. step 3: if A<B then print B is largest goto step 4. step 4: stop Back to questions
18
1. Input 2. Output 3. Definiteness 4. Finiteness 5. Effectiveness Back to questions
19
There are two main approaches to designing an algorithm: 1. Top-Down Approach: Identifying the major components of the system or program decomposing them into their lower level components In that hierarchy of module is used, and breaking the specification down into simpler and simpler pieces. 2. Bottom-Up Approach: A bottom-up design approach starts with designing the most basic or primitive components and proceeds to higher level components. It follows information hiding. It strongly support the idea of reusability Back to questions
20
LECTURE 04 Complexity Complexity is a characterization of the time or space requirements for solving a problem by a particular algorithm. Time Complexity: It is the amount of computer time that it needs to run to completion. Space Complexity: It is the amount of memory that it needs to run to completion. Back to questions
21
Ex: i=1; while(i<=n) { x=x+1; } 11 2N+1 3N 4n Time complexity is O(n)
22
Big ‘o’ notation, is a typical way of describing algorithmic efficiency. The efficiency of an algorithm is expressed as how long it runs in relation to its input. Big ‘o’ notation is used to describe the performance or complexity of an algorithm. Ex: O(n); O(log n); Here, O is know as big O notation. Back to questions
23
Limitations Of Big ’O’ Notation: 1. Big ‘O’ notation contains no effort to improve the programming methodology. 2. Big ‘O’ notation does not discuss the way and means to improve the efficiency of the program, but it helps to analyze and calculate the efficiency of the program. 3. Big ‘O’ notation does not exhibit the potential of the constants. Back to questions
24
MSBTE ASKED QUESTIONS 1.What is Data Structure? S-08,10,11,12,13,W-09,12(2M) W-13(1M)What is Data Structure? S-08,10,11,12,13,W-09,12(2M) W-13(1M 2.State the need of data structure. W-08,S-08,13(2M)State the need of data structure. W-08,S-08,13(2M) 3.Give the classification of data types. S-09,S-11,S-12(2M)Give the classification of data types. S-09,S-11,S-12(2M) 4.Explain the term primitive data type. W-12(1M)Explain the term primitive data type. W-12(1M) 5.Explain derived data type. W-12(1M)Explain derived data type. W-12(1M) 6.Describe the abstract data type. W-12(2M)Describe the abstract data type. W-12(2M) 7.State four level of refinement stages. W-09(4M)State four level of refinement stages. W-09(4M) 8.Explain classification of data structure.S-08(4M),W-08,W-09,S-10,S-13(2M)Explain classification of data structure.S-08(4M),W-08,W-09,S-10,S-13(2M 9.Define primitive data structure. W-08,13(1M)Define primitive data structure. W-08,13(1M) 10.What do you mean by non primitive data types. W-10(2M)What do you mean by non primitive data types. W-10(2M 11.Enlist data structure operations. S-10,W-10,S-12,W-12,S-13(4M)Enlist data structure operations. S-10,W-10,S-12,W-12,S-13(4M) 12.Define algorithm and explain characteristics of algorithm W-12(4M)Define algorithm and explain characteristics of algorithm W-12(4M 13.Explain different approaches to design an algorithm S-12,W-13,S-14(4M)Explain different approaches to design an algorithm S-12,W-13,S-14(4M 14.Explain time and space complexity related to algorithms with example.S-11,S-12,W- 12,13,S-13,14(4M)Explain time and space complexity related to algorithms with example.S-11,S-12,W- 12,13,S-13,14(4M) 15.Explain Big ‘O’ Notation S-14(4M)Explain Big ‘O’ Notation S-14(4M)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.