Shonu Tech

Business, Digital Marketing, SEO, Technology, Programming Languages, Computer

Home Advertisement Full Widh

Post Page Advertisement [Top]

Data Structure

data structure, data, data science, big data, google data studio, edi, data studio, etl, data mining, timestamp, hadoop, data analytics, metadata, data entry, dfd, data warehouse, csv file, timestamp to date, bigquery, nosql, data center, apache spark, redcap, business analytics, olap, rdbms, json to csv, linked list, quantitative data, binary search tree, relational database, binary tree, data flow diagram, dataset, data governance, data management, knime, world bank data, data collection, time series, big data analytics, aws glue, azure data factory, google studio, kaggle datasets, azure data studio, datatable, pandas read csv, csv to json, data base, big query, heap sort, primary data, global data, secondary data, priority queue, trie, discrete data, predictive analytics, data processing, geojson, struct, data driven, odata, dcim, raw data, edw, datawrapper, amazon redshift, nosql database, b tree, hyperscale, azure synapse, python queue, pandas to csv, data mart, crisp dm, cdata, google bigquery, red black tree, data type, data engineering, azure databricks, rapidminer, aws redshift, exploratory data analysis, free data, dashboards, linked list in c, data model, aws kinesis, context diagram, doubly linked list, pandas iloc, continuous data, all data, flat file, d3js, octoparse, apache superset, google data, column chart, netdata, dplyr, time series data, prescriptive analytics, data flow, datalake, mockaroo, mnist dataset, uci machine learning repository, database management, database design, apache hadoop, databank, data abstraction, data quality, data analysis in research, unstructured data, python data structures, struct c++, opendata, ssdt, datasets, iris dataset, data acquisition, debezium, disjoint set, data structures in c, world development indicators, customer data platform, hash map, linked list in data structure, data storage, tableau prep, anonymized, data integration, data migration, hashtable, er model, bigint, demographic data, heap data structure, google big query, csv reader, descriptive analytics, min heap, queue in data structure, azure synapse analytics, python stack, current timestamp, etl testing, etl process, c++ queue, minmaxscaler, c struct, stack in data structure, azure purview, typedef struct, amazon kinesis, spring data, circular queue, tree data structure, data steward, circular linked list, data cleansing, clob, dfd diagram, tableau server, data architecture, spatial data, primary and secondary data, max heap, python for data analysis, time series database, segment tree, google data analytics, google data center, data literacy, pandas profiling, qualitative data analysis, data source, trie data structure, pandas to excel, primary data and secondary data, datahub, data factory, data structures in java, trifacta, data frame, linked list c++, uint8, google dataset search, mysql datetime, adjacency list, data room, distributed database, census connect, pandas add column, pandas write csv, types of data structure, dataops, data mapping, c++ stack, kd tree, metaboanalyst, data and information, 365 data science, mysql timestamp, entity relationship model, deduplication, b+ tree, data tree, data driven decision making, data warehouse architecture, graph data structure, sql datetime, parquet file, powerdesigner, advanced analytics, singly linked list, mysql json, refinitiv eikon, uci dataset, relational model, microsoft dataverse, pandas astype, linked list in python, medidata rave, kaggle competition, datastream, data models in dbms, google servers, pandas iterrows, crdt, data analysis example, single source of truth, athena log in, csv to sql, read csv pandas, statistical data, data strategy, power bi gateway, data science projects, data profiling, relational database management system, infile, geospatial data, er model in dbms, database system, full binary tree, binary tree in data structure, ipums, sklearn datasets, json data, time series graph, boolean data type, r read csv, sources of data, openrefine, pentaho data integration, azure log analytics, data storytelling, data compression, data in brief, sql timestamp, data fabric, azure data explorer, snowflake company, ms power bi, no data, binary heap, citydata, mysql boolean, varchar2, a data, pandas read json, azure analysis services, redshift spectrum, qualitative and quantitative data, data is the new oil, logicmojo, json structure, python priority queue, stack and queue, string data type, analysis of data, orange data mining, data services, imf data, data collection in research, data point, non relational database, sap mdg, data virtualization, audit log, golang struct, data marketing, lambda architecture, rbind, google looker, dataminer, binary search tree in data structure, kdnuggets, web mining, learning analytics, cloudwatch logs, pandas save csv, clickstream, sql connection string, tabular data, data loader, kinesis firehose, quantitative data analysis, data system, jsonb, data is beautiful, structured and unstructured data, data server, data grip, pandas join two dataframes, erwin data modeler, lims system, ccpa compliance, odbc connection, google dataset, azure table storage, sql boolean, query sql, semi structured data, clinical data management, json to csv python, digital analytics, first party data, discrete and continuous data, spark read csv, aggregate data, test data, sqldbm, secondary data analysis, data platform, data sharing, priority queue python, data cube, database security, data file, threaded binary tree, webscraping, quadtree, realtime database, aws snowmobile, pandas show all columns, hadoop big data, common data service, dbf file, data scientist job, data access, pandas timestamp, data fusion, real time data, example of data, struct c#, fenwick tree, ecrf, apache parquet, data management system, digital data, pandas library, dmbok, etl tool, fiverr data entry, palantir foundry, data intelligence, dataloop, in a circular linked list, binary data, sorting in data structure, spss data analysis, datatable c#, database marketing, business intelligence software, types of linked list, fibonacci heap, doubly linked list in data structure, array in data structure, priority queue in data structure, python heap, treap, singly linked list in data structure, data schema, optimal binary search tree, c# hashtable, typedef struct c, doubly linked list in c, database structure, data structures in c++, balanced tree, hash table c++, stack using linked list, hash table python, binary tree python, recursion in data structure, binary search in data structure, perfect binary tree, b tree in data structure, circular queue in data structure, binary tree java, binomial heap, binary indexed tree, python structure, types of binary tree, hash table in data structure, heap tree, types of queue, structure of dbms, linked list c#, javascript data structures, binary search tree java, circular linked list in data structure, types of trees in data structure, searching in data structure, radix tree, min heap c++, heap java, balanced binary search tree, circular linked list in c, binary search tree c++, binary tree c++, geeksforgeeks data structures, list to tuple, advanced data structures, javascript stack, types of queue in data structure, python list to dictionary, b tree index, heap sort in data structure, golang struct to json, binary search tree python, queue using linked list, linked list javascript, prefix tree, circular queue in c, dynamic data structure, ds algo, search tree, dfs in data structure, stack using queue, python queue example, data structures using c, heap sort c++, data structure geeksforgeeks, singly linked list in c, list of tuples, hash map c++, c# data structures, stack queue, disjoint set union, circular doubly linked list, b+ tree in dbms, binary search tree example, binary tree in c, in a singly circular linked list, map data structure, narasimha karumanchi, stack lifo, binary tree example, types of sorting in data structure, struct golang, hash map python, singly linked list c++, traversing in data structure, set data structure, types of graph in data structure, stack using linked list in c, merkle trees, golang anonymous struct, json to struct, c stack, binary search tree in c, max heap c++, c initialize struct, heap sort in c, python max heap, trie tree, radix sort in data structure, list data structure, c++ initialize struct, extended binary tree, b tree in dbms, b+ tree in data structure, stack and queue in data structure, min max heap, min heap java, bloomfilter, bst in data structure, fundamentals of data structures in c, stack example, lifo data structure, heap in c++, min heap python

What is Data Structure-?

Organized collection of data in a particular format is called data structure. It is a technique or method of study that how the data are inter-related to each other logically or mathematically.

Classification of the Data Structure:-

        1. Linear and Non-Linear
        2. Homogenous and Heterogenous
        3. Static and Dynamic Data Structure

Searching in data structure with types
Searching is a method to finding an element from data structure with their appropriate location.

Divided in two types:-
        1. Linear Search 
        2. Binary Search

What is Linear Search-?

Linear search is a very basic and simple search algorithm. In linear search we search an element in given array by traversing the array from the starting till the desired element is defined.

Algorithm of Linear Search

Step 1:- Begin
Step 2:- Set a[5] ⬅ {10,20,30,40,50}
Step 3:- Set i ⬅ 0
Step 4:- Input searching item
Step 5:- Repeat step 6 and 7 while i<4
Step 6:- If a[i]=item, then print item found and location=i and exit
Step 7:- i ⬅ i+1
Step 8:- If i>=5, then print item not found
Step 9:- End

Program of Linear Search

#include<stdio.h>
#include<conio.h>
void main( )
{
    int a[5]={10,20,30,40,50}, i=0, item;
    clrscr;
    printf("Input searching item....";)
    scanf("%d",& item);
    while (i<5)
        {
            if (a[i]==item)
                {
                    printf("Item found location=%d",i);
                    break;
                }
                    i++;
        }
        if (i>=5)
        printf("Item not found");
        getch( );
}

User Input numbers

#include<stdio.h>
#include<conio.h>
void main( )
{
    int a[5] i=0, j, item;
    clrscr;
    printf("Enter array element");
    for(j=0;j<5;j++)
        {
            scanf("%d",&a[j];)
        }
    printf("Input searching item....";)
    scanf("%d",& item);
    while (i<5)
        {
            if (a[i]==item)
                {
                    printf("Item found location=%d",i);
                    break;
                }
            i++;
        }
    if (i>=5)
    printf("Item not found");
    getch( );
}

Meaning of Algorithm

Step-by Step detailed description of any program is called Algorithm

What is Binary Search-?

Binary Search is the divide and conquer searching technique in which we have to arrange the data in particular format or order before searching operation. After that we find the middle element of array and compare with the target element.
                If item is not found then we again check the target element is greater then or less then middle element, if it is greater then middle element other wise left side of middle element.

Algorithm of Binary Search

Step 1:- Begin
Step 2:- Set a[5] ⬅ {10,20,30,40,50}
Step 3:- Set lr ⬅ 0, up ⬅ 4, f ⬅ 0
Step 4:- Input searching item
Step 5:- Repeat step 6, 7 and 8 while (lr<=up)
Step 6:- Set mid ⬅ lr+up by 2
Step 7:- If a[mid]=item, then Set F=1 & break
Step 8:- If a[mid]<item, then Set lr ⬅ mid+1
                else
                Set up ⬅ mid-1
Step 9:- If F=1, then print item found with loc=mid
                else
                print item not found
Step 10:- Exit

Program of Binary Search

#include<stdio.h>
#include<conio.h>
void main( )
{
    int a[5]={10,20,30,40,50}, lr=0, up=4, f=0, mid, item;
    clrscr();
    printf("Enter searching item:");
    scanf("%d",&item);
    while (lr<=up)
        {
            mid=(lr+up)/2;
            if (a[mid]==item)
                {
                    f=1;
                    break;
                }
            if (a[mid]<item)
            lr=mid+1;
            else
            up=mid-1;
        }
    if (f==1)
    printf("Item found with location=%d", mid);
    else
    printf("Item not found");
    getch;
}

What is Stack-?

Stack is a collection of data item where the insertion and deletion tales place on one  end called TOP of the stack.
In stack we can perform two operations i.e..., PUSH and POP.
        PUSH means inserting a new item into the stack
         POP means deleting an item from the stack
Stack always perform LIFO operation that means last in first out, A stack can represent by the help of Array and linked list.

Difference between Stack and Queue.

S.no. 

Stack 

Queue 

1 

Stack follow LIFO operation, i.e.., last in first out 

Queue follow FIFO operatio, i.e.., first in fist out 

2 

Insertion and Deletion takes places on one end 

Insertion and deletion takes place on opposite end 

3 

Stack perform two operations, i.e.., PUSH and POP 

Queue perform two operation, i.e.., REAR and FRONT 

4 

In Stack:- 

In queue:- 

 

1. PUSH is used to insert the element in the stack 

1. REAR is used to insert the element in the queue 

 

2. POP is used to delete the element from the stack 

2. Front is used to delete the element from the queue 

5 

Stack doesn't have any type 

Queue has various type like General Queue, Circular Queue and Doubly Queue 

6 

In stack only one pointer is used, i.e.., top of the stack 

In queue two different pointers are used REAR & FRONT 


Algorithm for PUSH operation in Stack

Step 1:- Begin
Step 2:- If TOP =N then
                Print overflow and exit
Step 3:- Input new item
Step 4:- Top ⬅ TOP+1
Step 5:- Stack [TOP] ⬅ item
Step 6:- Exit

Algorithm for POP operation in Stack
Step 1:- Begin
Step 2:- If TOP=-1
Step 3:- Set item ⬅ stack [TOP]
Step 4:- TOP ⬅ TOP-1
Step 5:- Print deleted item
Step 6:- Exit

Program of Stack
#include<stdio.h>
#include<conio.h>
int stack[5], top=-1;
void push( );
void pop( );
void show( );
void main( );
{
    int ch;
    clrscr( );
    printf("1. PUSH\n");
    printf("2. POP\n");
    printf("3. SHOW\n");
    printf("4. EXIT\n");
    while(1)
    {
        printf("\n Enter choice: ");
        scanf("%d",&ch);
        switch(ch)
        {
            case 1:push( );
                    Break;
            case 2:pop( );
                    Break;
            case 3:show( );
                    Break;
            case 4:exit( );
                    Break;
            default:printf("Invalid Option");
        }
    }
}
void push( )
{
    int item;
    if (top==5-1)
    {
        printf("stack is full")
    }
    else
    {
        printf("Push element is stack: ");
        scanf("%d",&item;)
        top=top+1;
        stack[top]=item;
    }
}
void pop( )
{
    if (top==-1)
    {
        printf("Stack is emplty");
    }
    else
    {
        printf("POPPED %d",stack[top]);
        top=top=1;
    }
}
void show( )
{
    int i;
    if (top>=0)
    {
        printf("Stack element %n ");
        for(i=top;i>0;i--)
        {
            printf("%d, stack[i]");
        }
    }
    else
    {
        printf("stack is empty");
    }
}

No comments:

Post a Comment

Bottom Ad [Post Page]