230 likes | 359 Views
FP 305. DATA STRUCTURE. By : Suzila Yusof. INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS. Mathematic. Study of Computer Science. Science. Engineering. Continuance. A mathematical formulation expert. Computer Scientists. Know the scientific and systematic methods.
E N D
FP 305 DATA STRUCTURE By : SuzilaYusof
INTRODUCTION TO DATA STRUCTURES AND ALGORITHMS Mathematic Study of Computer Science Science Engineering
Continuance A mathematical formulation expert Computer Scientists Know the scientific and systematic methods Creative thinking in the design of algorithms and selecting the approriate data structure
continuance • Algorithm The selection of data structures& key-to algorithm = effectiveness eds. problems: storage space & runtime Computer Troubleshooting • Data Structures
introduction to algorithms Algorithms Conducts a series of structured, step by step to solve the problem Data Structures Methods for compiling the data to be processed by computer In SK, the algorithms is a sequence of introductions to a computer that provides logical solutions to a problem. It involves operations on data collection.
Continuance Sequence : the sequence of each step performed step by step Options : one of several implementation options will be selected and implemented Structured Algorithms Repeat / Loop : one or more steps executed repeatedly Easy to read, understood, analyzed and corrected (error) >effective
Continuance Algorithms written in various forms:human natural language, pseudo code, flow chartor programming languages such as Pascal, C, C ++, etc.
Continuance A finite solution (no finish) Each direction is clear Important Feature of the algorithms Have input, to begin implementation Has an output, the result of the implementation Can run when the tool or effective
Case studies Problem to determine and print the largest number between two numbers are read from the keyboard • Algorithms : • Comparing the two numbers to get the greatest value. • Solution using : • Human nature language • Flow chart
Natural language • Read number1 and number 2 • If the number1 is greater than the number2 • 2.1 Printing a message number greater than the number2 • 3. If number2 is greater than the number1 • 3.1 Printing messages larger than the number2 and number1 • 4. If conditions ‘2’ and ‘3’ is not true • 4.1 Printing messages number1 and number2 is the same value • 5. Finish
Flow chart START BACA nombor JIKA nombor1 > nombor2 Ya CETAK “nombor2 > Nombor1” Tidak JIKA nombor2 > nombor1 Ya CETAK “nombor1 > Nombor2” Tidak CETAK“nombor1=nombor2” END
introduction to data structure Algorithms Conducts a series of structured, step by step to solve the problem Algorithms Conducts a series of structured, step by step to solve the problem Combination of data values which are based on structured that will form the data structure. Several sets of operations can be performed on the data structure.
Continuance Storage Structure DATA STRUCTURE Link Structures Structural Relationship Structural Conditions
Storage structure • Control the layout of data in memory directly divided into two types : • Array • Record or structure
link structure For connecting a node (a structural arrangement of data, usually in the form of records) to other nodes. Related nodes can be done in linear or non linear.Example- linked list- tree- graph
Structure conditions Structural conditionsto describe the tasks that occur in a process that occurs in the real world.Example- Stack- Queue
Structure relationship Implement the key relationship between access and other data to facilitate search operations.Example- Table- Search tree
Mobile Data (Simple Data Types) • Pointer Data (Pointer) • Structured data • Basic Data Data Types • Abstract Data
Choice of data Choice of Data Depending on the value to be represented by the variable Of age - integer data typesStudent's name - the variable array of type character
simple data types The data type can only store one value. Divided into two types:- Pre-define data typesdata types defined by programming languages such as int: integer data type, char: character datatype, etc.- User-define data typesuser-defined data type is defined by the programmer data as numeric data types (enumerated data types)
pointer data types User-defined data types depending on the type of data is accused by the pointer variables (as determined by the user)
structured data types Type of data that can be defined by the user.For example: arrays and structures
abstract data types Modeling an object from the real world operations. Of this model, data structure built by programmer using some type of data available.eg linked list, stack, queue and tree