DATA STRUCTURES & ALGORITHMS

Introduction

This blog series is for anyone who wish to learn Data Structures & Algorithms from scratch or just to brush up the topics.

DSA is heart of Computer Science and you simply can't skip it. It helps alot during placements.

This series covers both theory(in shorts) and implementation(in C++). I will attach the code file at the end of implementation part.

What is Data Structure?

Data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.

A data structure is a special format for organizing and storing data. It makes the students to understand the way in which the data is organized and retrieved later.

Types of DS:

Depending on the organization of the elements, data structures are classified into two types:

Linear DS: Elements are accessed in a sequential order but it is not compulsory to store all elements sequentially. Examples: Linked Lists, Stacks and Queues.

Non–linear DS: Elements of this data structure are stored/accessed in a non-linear order. Examples: Trees and graphs.

What is Algorithm?

An algorithm is the step-by-step unambiguous instructions to solve a given problem.

An algorithm contains finite set of instructions that are carried in a specific order to perform specific task.

Analysis of an Algorithm:

Mainly there are two criteria for judging the merits of algorithms:

Correctness: Does the algorithm give solution to the problem in a finite number of steps?.

Efficiency: How much resources in terms of memory and time does it take to execute the problem?.

What is ADT?

An Abstract Data Type(ADT) is user-defined data type which can be implemented by defining set of operations on them.

While defining the ADTs, do not worry about the implementation details. They come into the picture only when we want to use them. Different kinds of ADTs are suited to different kinds of applications, and some are highly specialized to specific tasks.

Commonly used ADTs:

Linked Lists, Stacks, Queues, Priority Queues, Binary Trees, Dictionaries, Disjoint Sets (Union and Find), Hash Tables, Graphs etc.

Checkout the full series: DSA Series

That's it from this blog post. If you liked it then do share this blog with your friends or people who wanna get into programming world. Thank You!

Copyright © NStF Blogs 2021