Analisis Algoritma Bubble Sort Ascending/Descending Pada Bahasa Pemrograman Java

Authors

  • M. Benny LPK-Codingin Banten, Indonesia Author

Keywords:

Bubble Sort, Java Programming Language, Algorithm Complexity

Abstract

Bubble Sort Algorithm is one of the fundamental sorting methods commonly used to introduce the concept of sorting in computer science. This study analyzes the implementation of the Bubble Sort algorithm for ascending and descending sorting in the Java programming language, focusing on complexity, operational steps, and execution performance. The research methodology includes literature review, Java code development for both sorting modes, and testing using various data scenarios (random, sorted, and reverse sorted). The analysis results indicate that the ascending and descending implementations differ only in the element comparison condition, yet both have a time complexity of O(n²) in average and worst cases. Testing with small to medium-sized data reveals that the number of comparison and swapping steps depends on the initial data condition. In the best case (already sorted data), the time complexity reaches O(n), while in the worst case (reverse sorted data), the maximum number of operations is required. Although inefficient for large datasets, Bubble Sort remains relevant in educational contexts and simple applications due to its logical simplicity and ease of implementation. This study concludes that a deep understanding of this algorithm can serve as a foundation for learning more complex sorting techniques.

Downloads

Download data is not yet available.

References

Aly, A. G., Jensen, A. E., & ElAarag, H. (2025). Improving Merge Sort and Quick Sort Performance by Utilizing Alphadev’s Sorting Networks as Base Cases. ArXiv Preprint ArXiv:2503.05934.

Ambarsari, I. F. (2023). BAB 4 KOMPLEKSITAS ALGORITMA. MATEMATIKA DISKRIT, 55.

Ansori, A., Damyati, F., & Dhestyani, S. A. (n.d.). Assessing AI Integration in Islamic Higher Education: A Mixed-Methods Fishbone Diagram Analysis. IJID (International Journal on Informatics for Development), 13(2), 504–516.

Arifin, N., Fauziah, F., & Nurhayati, N. (2022). Kombinasi Algoritma Sequential Searching dan Bubble Sort Pada Manajemen Laboratorium. J-SAKTI (Jurnal Sains Komputer Dan Informatika), 6(1), 294–306.

Aryanto, R. P., Nilogiri, A., & Wardoyo, A. E. (2023). Selection Sort Hybrid dan Bucket Sort.

Brachman, R. J., & Levesque, H. J. (2023). Machines like us: toward AI with common sense. MIT Press.

CHING, K. V. (2021). MATHEMATICAL MODELLING AND OPTIMIZATION OF MULTISITE EFFICIENCY TO REDUCE COST OF TEST IN SEMICONDUCTOR FINAL TEST PROCESS USING TAGUCHI METHOD.

Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to algorithms. MIT press.

Dewanta, F., & Nuha, H. H. (2021). Pemrograman Java Untuk Aplikasi Berbasis Jaringan. Coins Research.

Eken, H., Lanotte, F., Papapicco, V., Penna, M. F., Gruppioni, E., Trigili, E., Crea, S., & Vitiello, N. (2023). A locomotion mode recognition algorithm using adaptive dynamic movement primitives. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 31, 4318–4328.

Lombu, A. S. (2024). Prediksi Poin Fantasy Premier League Berdasarkan Posisi Pemain Berbasis Deep Learning. Universitas Islam Indonesia.

Merino, A., Micka, O., & Mütze, T. (2022). On a combinatorial generation problem of Knuth. SIAM Journal on Computing, 51(3), 379–423.

Mulyana, A. (2023). E-Books Cara Mudah Mempelajari Algoritma dan Struktur Data. Ade Mulyana.

Rahmani, I., & Khalid, M. (2022). Smart Bubble Sort: A Novel and Dynamic Variant of Bubble Sort Algorithm. Computers, Materials & Continua, 71(3).

Ramadhan, R. P., & Widiono, S. (2024). Development of an Android-Based Food Ordering Application Using the Bubble Sort Algorithm with Database Integration and Electronic Payment Methods. Journal of Scientific Research, Education, and Technology (JSRET), 3(4), 1828–1840.

Rantung, V. P., & ST, M. (2023). Teknik-Teknik Pemrosesan Bahasa Alami (NLP). Lakeisha.

Sari, N., Gunawan, W. A., Sari, P. K., Zikri, I., & Syahputra, A. (2022). Analisis algoritma bubble sort secara ascending dan descending serta implementasinya dengan menggunakan bahasa pemrograman java. ADI Bisnis Digital Interdisiplin Jurnal, 3(1), 16–23.

Sitorus, Z., Renyaan, A. S., Si, S., Kmurawak, R. M. B., & Lokollo, P. D. (2024). Tinjauan mendalam tentang ilmu komputer: konsep dasar, algoritma, dan perkembangan terkini: buku referensi. PT. Media Penerbit Indonesia.

Sucipto, H., Rizal, M. F., Mujianto, A. H., Ali, M., Kistofer, T., Mashuri, C., & Indriyanti, A. D. (2024). Artikel Rancang Bangun Sistem Pengukuran Tingkat Kemiripan Judul dan Abstrak Skripsi menggunakan Algoritma Winnowing dan Dice Similarity. Prosiding Seminar Nasional Sains, Teknologi, Ekonomi, Pendidikan Dan Keagamaan (SAINSTEKNOPAK), 8, 229–238.

Ul Islam, T., Shahriar, S., Uddin, M., & Rakib Hassan, M. (2023). Pseudo-Knighted Cocktail Shaker Sort. International Conference on Trends in Electronics and Health Informatics, 149–167.

Zulfa, M. L., Mikhael, M., & Sari, B. N. (2022). Analisis Perbandingan Algoritma Bubble Sort, Shell Sort, dan Quick Sort dalam Mengurutkan Baris Angka Acak menggunakan Bahasa Java. Jurnal Ilmiah Wahana Pendidikan, 8(13), 237–246.

Downloads

Published

03-05-2025

Issue

Section

Articles