2What are Data Structures & Algorithms A data structure is an arrangement of data in a computer’s memory (or sometimes on a disk). Data structures include arrays, linked lists, stacks, binary trees, and hash tables, among others.Algorithms manipulate the data in these structures in various ways, such as searching for a particular data item and sorting the data.
3What sort of problems can be solved? Real-world data storageBy real-world data, we mean data that describes physical entities external to the computer. As some examples, a personnel record describes an actual human being,How would you store, insert, delete, search and sort in quick way.Programmer’s toolsA programmer uses such structures as tools to facilitate some other operation. Stacks, queues, and priority queues are often used in this way.ModelingThe most important data structure of this type is the graph. You can use graphs to represent airline routes between cities or connections in an electric circuit or tasks in a project.
4Overview of Data Structures Overview of AlgorithmFor most data structures, you need to know how toInsert a new data item.• Search for a specified item.• Delete a specified item.Overview of Data Structures
6System Life Cycle Requirement Analysis Design Refinement and Coding Verification (testing and error removal)
7Problems with Procedural Language Poor modeling of the real worldFurnace-on(), furnace-of() –x-- thermostateCrude organizational unitsdata could be local to a particular method, or it could be global—accessible to all methods (no concept of encapsulation or reusability)
8OOP OOP is a method of implementation in which Objects are the fundamental building blocksEach object is instance of some type (class)Classes are related to each other by inheritence relationshipInheritance is the creation of one class, called the extended or derived class, from another class called the base class. The extended class has all the features of the base class, plus some additional features.
9OOPPolymorphism involves treating objects of different classes in the same way. For polymorphism to work, these different classes must be derived from the same base class. In practice, polymorphism usually involves a method call that actually executes different methods for objects of different classes.Data encapsulation or information hiding is the concealing of the implementation details of a data object from the outside world.E.g we do not interact with circuits instead we only know RW, FW, Play
10OOPData Abstraction is the separation between the specification of a data object and its implementation.E.g manual makes clear distinction between the buttons of VCR.An abstract data type (ADT) is a data type that is organized in such a way that the specification of the objects and the specification of the operations on the objects is separated from the representation of the objects and implementation of the operations.