Skip to main content

Data Structure And Algorithm Important Topics Overview

 

Overview Of Data Structures And Algorithms

This post will give you the clear idea about learning data structures and algorithms. So, Data structure? => In computer science a data structure is a data organization , management and storage format that enables efficient access and modification. Or in the other words it is a way in which data is stored on a computer.

Types of data structures:-

  • Array 

  • String

  • Stack

  • Queue

  • Linked List 

  • Binary Tree

  • Binary Search Tree

  • Heap

  • Hash Table

  • Graph

Above topics, array is a linear data structure which stores the data in the sequence order, dynamic array, every data is stored in the next contiguous memory location.

 

String is a collection of characters. If it contains the alphabets and it also uses the digit as character. If a string is composed of numbers and characters then numbers are also treated as characters.


Stack is also a linear data structure. It works either on Last In First Out or First In Last Out. It has only one entry and exit side, From one side the pushing of element and popping of element. A pointer is used to allocate the current memory location on the stack.


Queue works on the principal of First In First Out. It has two ends, front and back. The front contains the starting index of the queue and the end contains the last index of the queue element, stack queue.


Linked list is also a linear data structure. In this there is a node which contains the data and address of the next node. Whenever a node is created it is created with a data field and a node type pointer which points to the next node in the linked list.

Linked list is of Three types:- 

  • Single Linked List

  • Doubly Linked List

  • Circular Linked List

In Singly Linked List, there is a node which contains the data and address of the next node. Whenever a node is created it is created with a data field and a node type pointer which points to the next node in the linked list.


Doubly linked list , there are two pointers, first is the next pointer and second is the previous pointer. First pointer points to the address of the next node like in the single linked list , next pointer does and second pointer previous points to its previous node in the linked list, also a data field is associated with the node.


In the Circular linked list, it forms a loop in the list. In this head points to the first node in the linked list and there is no node null, last node does not point to the NULL. Last node always point to the first or head node of the list.


Binary Tree is a non- linear data structure. It contains a root node and it has at most two child nodes. Binary Search Tree is  as the Binary Tree , in this searching is done in-order, pre-order and in post-order.


Heap is used to find the mean heap and max heap of a given array. It is the best method to find the maximum and minimum of an array.


Hash Table is mainly used to find the frequency of a number or a character in an array or in a string. It uses  the key- value pair to store the result of the problem.


Graph is a non-linear data structure. It can be used to find the cycle in the give problem such as to check the given tree is a spanning tree or not. If the given graph forms a cycle then it is not a spanning tree else the given graph is a spanning tree.


Above all the topics are of the data structure and  a clear description about each and every topic of the first section. Now definition of  algorithm and its topics.


Algorithms:- Finite set of steps to solve a problem, comparison with respect to the Time complexity and the Space complexity of the problem.


Important topics of the Algorithm:-

  • Asymptotic Analysis

  • sorting

  • searching

  • Randomized Algorithms

  • General Recursion

  • Back Tracking

  • Branch And Bound

  • Divide And conquer

  • Greedy Algorithms

  • Dynamic Programming

Asymptotic Analysis :- It is used to find the space complexity and time complexity of a problem. There are some notations are used to find it such as:-

  • Big-oh(o)

  • Big-omega(omega)

  • Theta(theta)

Sorting is a technique which is to arrange the numbers of characters in a particular order, it is used to re-order the element of an array either in the ascending or descending order. Some of the important sorting techniques are as follow :-

  • Selection Sort

  • Insertion Sort

  • Bubble Sort

  • Quick Sort

  • Merge Sort


Searching is performed on an array or in a linked list or in data structure to find a particular element in an array.  Some of the important topics of searching:-

  • Linear Search

  • Binary Search

Randomized algorithms, General Recursion, to find the recurrence relation of the problem.

Backtracking performs on the tree like approach. Problem is divided into the tree structure and back track to generate the result of that problem.


In Divide and Conquer, first a large problem is divided into many small problems and solve that small problem and results of all small problems are added together to get the  final result of that problem.


Greedy Algorithm topics are job sequencing, Knapsack, Optimal merge pattern, Huffman coding, Dijkstra algorithm and MST.


Dynamic Programming :- It is an approach to solve a problem, it stores the current result of the problem and starts to find the next solution and adds in the result . Some of the topics are as follow:-

All pairs shortest path, multistage graph, Optimal binary search, TSP, 0/1 Knapsack, Matrix Chain.


For the theory questions are asked from the engineering core subjects. You must have knowledge about the basics of your core subjects. Core subjects like Computer networking, Database Management System, Operating system, System design and Testing.  


All the topics are mentioned in the post. These topics are important for both On-Campus or Off-Campus placement. Majority of the product based companies ask questions on the topics. 


In multiple job interviews, questions from data structure and basic algorithmic. But for the service based company, if you have command only on the data structure then it is ok.


Comments

Popular posts from this blog

Merge Arrays : Merge Two Arrays Of Different Size In C++

Merge Two Arrays C++ Program C++ program to merge two arrays of different size. First array size is m and second array size is n. The size of the first array is greater than the first array i.e. m>n.                               Algorithm :- Enter the size of first array m. Enter the size of 2nd array n. Enter the elements of 1st and 2nd array and number of elements of first array should be greater than the number of elements of second array. After m index of first array, insert the element of second array into the first array up to m+n-1. Sort the merge array of size m+n. Display the first array, which will display all the elements of the merge array of size m+n. Program: - #include<iostream> using namespace std; int main() { int i,n,m,a[15],b[5],j;//array a[] and b[] are declared cout<<"Enter the size 1st array:-"<<endl; cin>>m; cout<<"Enter the size of 2nd array(n<m...

C++ Vector : Basics Of Vector in C++ STL

In C++, Vector is unlike array, it stores different data types such as int, double, string, float, etc. It works like the dynamic array with the ability to resize automatically itself. Vector stores data in the contiguous memory location. Two functions are needed to traverse from starting to end that is begin() and end() functions.                               Syntax of the vector declaration:-             vector<data_type> variable_name (number_of_elements);  Here number_of_elements is optional, we can also declare a vector with empty vector that contains zero elements. The data_type in the angle-brackets indicates any type of data type which is valid in c++. Vector declaration examples:- vector<int> numbers (10); //In this example, we declared a vector name number of 10 integers. vector<string> names;  //In this, a vector name declared of string. In eve...