Friday, 23 October 2015

Data Structure Tutorial, Notes & Interview Questions

Data Structure concept is one of the most important technical topic which are being generally asked in Interviews. Even big placement companies like Google, Amazon, etc expect us to have a good knowledge of Data Structure. In this Data Structure Tutorial, we will be covering up all basic concepts which will help you in preparation before your interview rounds.

Introduction to Data Structure:


Data Structure is a way of organizing data so that it can be used efficiently.

डेटा स्ट्रक्चर एक ऐसा तरीका है जिससे हम डेटा को व्यवस्थित तरीके से रख सकते है ताकि हम उसका बेहतर ढंग से उपयोग कर सके।

For Example: Dictionary - It contains meanings of all words in an alphabetic order so that we can find our desired word easily. This is a real life example for Data Structure.

Types Of Data Structure:

There are two types of Data Structure - 

1. Built-In / Primitive Data Structure.
2. User Defined / Abstract Data Structure.

Built-In Data Structure: It consists of data types which are predefined in the programming language and stores data in it like - int, character, float, pointer, etc

User Defined Data Structure: It consists of data types created by users for organizing and manipulating large data efficiently. Ex.: Array, Stack, Queue, Link List, Tree, Graph, etc.
User Defined / Abstract Data Structure is the Complex Data Structure which are used to store large and connected data.
User Defined / Abstract Data Structure is further divided into two parts -

1. Linear
2. Non-Linear

Linear Data Structure: In this data is stores in linear and well organized way.

Ex.: Array, Stacks, Queues, Link List.

Array Diagram
Queue DiagramStack Diagram
Link List Diagram

Non-Linear Data Structure: It consist of Trees, Graphs, Tables, Sets, etc.

Algorithm & Complexities:


Algorithm is the blueprint of any program, that is it is a set of instructions to perform a particular task. We can call it as a logic or overview of a program which can be later expanded to pseudo-code or flowchart.

Efficiency of an Algorithm:

Efficiency of an Algorithm can be calculated by considering two major factors that are - Time Complexity and Space Complexity.

We can say an algorithm as efficient if it takes less time and space.

Time Complexity:

It is the measure of time taken by a program to get completely executed.

Space Complexity:

It is the measure of space required by the instructions, data & environment during execution of the program.


0 comments

Post a Comment