Wednesday, October 4, 2017

# Introduction and Basic Terminology of DSA

Information is power. But information is the collections of organized data and data is the values of attributes.
Example:
Attributes First Name Last Name Age Sex
Values Elliyas Ahmed 24 Male

• Data Item: Single unit of values.
• Sub Items: Here First Name and Last Name are two Sub Items.
• Group Items: Color = {Red, Blue, Violet}

Elements of organized data: Fields, Records, Files.
• Field: A single elementary unit to represent an attribute of an entity. Example: Age, Sex
• Record: A collection of field.
• File: A collection of record.
Primary Key: An attribute from a record can serve as Primary key if it be the unique. Observe the following record:

SL. NO Student Name Session Age
1 Masud Parvej 2012-2013 24
2 Rahul Roy 2009-2010 27
3 Masud Parvej 2013-2014 24
Here SL.NO attribute is the unique. Because, the values of other attributes (Student Name, Session, Age) may be same but the values of first attribute can’t be same. So SL.NO is the primary key for this record.

Data Structure: The organization of Data in logical or mathematical is called Data Structure.
1. Arrays: Type of Data Structure that contains a list of finite numbers or characters.
2. Linked Lists: Linked list is a linear collection of elements (of data) and the order of linear is ordered by means of pointer.
3. Trees: A non linear data structure to represent the relationship between element in hierarchical.
4. Stack: Stack is a list of elements, in which element can be inserted or deleted from the top. So it is known as LIFO (Last In First Out). Example: Stacks of plates in a bucket.
5. Queue: Queue is a list of elements, in which element can be deleted from the bottom or end. So it is known as FIFO (First In First Out). Example: A Queue of Bus.
6. Graph: A graph is a non linear data structure which is consist of nodes and edges.
Data Structure Operations:
• Traversing: Accessing all record exactly once sequence by sequence. Example: Reading, Printing all the elements of a record once.
• Searching: Finding the location of a given value from record base on condition.
• Inserting: Adding new record to the given record.
• Deleting: Removing any record from the given record. Sorting: Arranging records in logical or mathematical order.
• Merging: Appending records.

#### Algorithms

Algorithm: he easiest and effective steps for solving a problem. Complexity: It is the function of algorithm that returns running time, memory space in terms of input. Questions on this lesson:

Try to solve without revise. If you can’t, try again from the beginning of this lesson.

1. What is the main difference between field, record, file?
2. For a record, what is the condition for an attribute to serve as primary key?
3.  What are the major operations of Data Structure? What is the measure of complexity of algorithm?

Elliyas Ahmed

Hi, I am Elliyas Ahmed, the founder of ComProMath. I try to share the legit content. If you found this helpful, please comment. Because a comment inspire me.

For any help - `contact@compromath.com`

Work With Me - SEO Expert, Blogger, Blogger Theme Developer on Fiverr