Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website 😊
Still working on it 😊
Download Telegram
Just download extract n run

Don't delete any folder that is created once extraction done open application
Data Structures
A data structure is a model where data is organized, managed and stored in a format that enables efficient access and modification of data.

Different forms of data may require different types of data structures.

A program built using improper data structures will be therefore inefficient or unnecessarily complex. It is necessary to have a good knowledge of data structures and understand where to use the best one.
Inbuilt Data Structures

Inbuilt data structures are provided by most programming languages. They may be used to derive other data structures.
Arrays
Stores elements of the same type in a contiguous block of memory, can accessed by a common identifier.
Visit Website
Open navigation menu
Data Structures Handbook
Data Structures
A data structure is a model where data is organized, managed and stored in a format that enables efficient access and modification of data.

Different forms of data may require different types of data structures.

A program built using improper data structures will be therefore inefficient or unnecessarily complex. It is necessary to have a good knowledge of data structures and understand where to use the best one.
Inbuilt Data Structures

Inbuilt data structures are provided by most programming languages. They may be used to derive other data structures.
Structures
Creates a data type that can be used to group items of different types into a single type.
Abstract Data Type (ADT)

Abstract Data Types are defined by its behaviour from the point of view of the user of the data. It defines it in terms of possible values, operations on data, and the behaviour of these operations.

The definition of ADT only mentions what operations are to be performed but not how these operations will be implemented. It does not specify how the data is being handled under the hood, this is known as abstraction.
Linked Lists
Consists of nodes, where each node points to some other node forming a sequence.
Stacks
The insertion and deletion operations are performed at only one end. It follows the LIFO principle.
BUBBLE SORTING

Sorting In Arrays
Sorting Operation

Sorting is the process of arranging a list of elements in a particular order (Ascending or Descending). Sorting is used to arrange data, and sometimes could be used to reduce complexity of other algorithms.
Terminologies
Internal/External Sorting

In internal sorting all the data to sort is stored in memory all the time while sorting is in progress.

In external sorting data is stored outside memory (like on disk) and only loaded into memory in small chunks. External sorting is usually applied in cases when data can't fit into memory entirely.
Stability of Sort

A sorting algorithm is said to be stable if two objects with equal keys appear in the same order in the sorted output as they appear in the unsorted input.

A sorting algorithm is said to be unstable if there are two or more objects with equal keys which don’t appear in same order before and after sorting.
1. Bubble Sort

Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order. The pass through the list is repeated until the list is sorted.
Average Time Complexity: O(n ^ 2)
Worst Time Complexity: O(n ^ 2)
Space Complexity: O(1)
Stability: Stable
πŸ‘1
int main()
{
int a[20],n,i,j,temp;
printf("Enter the number of elements: ");
scanf("%d",&n);
printf("Enter the elements: ");

for(i=0;i<n;++i)
scanf("%d",&a[i]);

for (i = 1; i < n; i++)
for (j = 0; j < (n - i); j++)
if (a[j] > a[j+1])
{
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
}

printf("\nArray after sorting: ");
for(i=0;i<n;++i)
printf("%d ",a[i]);
return 0;
}
Animation ( HOW SORTING IN ARRAYS WORKS )
TODAY IS DRIVE SO COME TO INSTITUTE
Java Hyd Team
GIF
Bubble sorting
Java Hyd Team pinned Β«TODAY IS DRIVE SO COME TO INSTITUTEΒ»
Java Hyd Team
TODAY IS DRIVE SO COME TO INSTITUTE
Not 100% sure about drive πŸ˜‚
Depends upon situation possible drive