0% found this document useful (0 votes)
14 views15 pages

Compilation of Data Structure and Algorithm Programs GROUP1

the compilation of Data Structure and Algorithm

Uploaded by

castrorobertjr21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views15 pages

Compilation of Data Structure and Algorithm Programs GROUP1

the compilation of Data Structure and Algorithm

Uploaded by

castrorobertjr21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Compilation of data Structure and algorithm

Submitted by:
Roxanne A. Divina
Melody Velasco

Submitted to:
Jeriko G. Pelimiano
I.
Table of Contents:

CONTENTS
II.
A. TITLE PAGE . . . . . . . . . . . . . . . . . . . . .

B. TABLE OF CONTENTS . . . . . . . . . . . . . . . . .

C. BRIEF DISCUSSION ABOUT DATA STRUCTURE AND ALGORITHM. . . . . . . . . . . . . . . . . . .

D. PROGRAMS . . . . . . . . . . . . . . . . . .

E. CURRICULUM VITAE . . . . . . . . . . . . . . . . . .

pg. 1
III. BRIEF DISCUSSION ABOUT DATA STRUCTURE AND ALGORITHM:

1. Datatypes: This program demonstrates basic input and output operations with
different data types such as String, int, double, char, and boolean. It utilizes the
`Scanner` class for input.

2.Enumeration Type: This program introduces the concept of enumeration type in Java.
It defines an enum `Color` and then allows the user to select two colors. Based on the
combination of colors chosen, it provides a result by mixing the colors.

3. Simple Array Abstract Type: This program showcases an abstract class


`SimpleArrayAbstractType` and its subclass `SimpleArraySubType`. The abstract class
defines methods for inputting values into an array, processing the array (as an abstract
method), and printing the array. The subclass implements the `process` method to
double each element of the array.

4. Bubble Sort: This program implements the bubble sort algorithm to sort an array of
integers in ascending order. It repeatedly steps through the list, compares adjacent
elements, and swaps them if they are in the wrong order.

5. Insertion Sort: This program demonstrates the insertion sort algorithm to sort an
array of integers. It iterates through the array, shifting elements that are greater than
the current element to the right, and then places the current element in the correct
position.

6. Merge Sort: This program implements the merge sort algorithm to sort an array of
integers. It divides the array into two halves, recursively sorts the halves, and then
merges them to produce a sorted array.

7. Selection Sort: This program showcases the selection sort algorithm to sort an array of
integers. It repeatedly finds the minimum element from the unsorted part of the array
and swaps it with the first element.

pg. 2
IV. PROGRAMS:

Datatype:

Samle Output:

pg. 3
Enumerationtype:

Sample Output:

pg. 4
Abstracttype:

pg. 5
Sample Output:

pg. 6
BubbleSort:

Sample Output:

pg. 7
SelectionSort:

pg. 8
Sample Output:

pg. 9
MergeSort:

Sample Output:

pg. 10
InsertionSort:

pg. 11
Sample Output:

pg. 12
V.

CURRICULUM VITAE:

ROBERT V. CASTRO JR.


BSIT-1
19 years old
MALLIG PLAINS COLLEGES INC.

KRYSTAL KIM B. ULAY


BSIT-1
19 years old
MALLIG PLAINS COLLEGES INC.

pg. 13
pg. 14

You might also like