
Uji Pemahaman Sorting dan Searching

Quiz
•
Computers
•
12th Grade
•
Hard
0ky S@nj@y@
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa itu algoritma Bubble Sort?
Bubble Sort adalah metode pengurutan yang hanya membandingkan elemen pertama dan terakhir.
Bubble Sort adalah algoritma pencarian yang menggunakan rekursi.
Bubble Sort adalah algoritma pengurutan yang membandingkan dan menukar elemen bersebelahan.
Bubble Sort adalah algoritma yang mengurutkan data dengan menggunakan pengulangan tanpa perbandingan.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Jelaskan langkah-langkah dalam algoritma Selection Sort.
Tukarkan elemen secara acak hingga semua elemen terurut.
Langkah pertama adalah mengurutkan semua elemen secara bersamaan.
Temukan elemen terbesar, 2. Tukar dengan elemen terakhir, 3. Ulangi untuk elemen sebelumnya.
Langkah-langkah dalam algoritma Selection Sort adalah: 1. Temukan elemen terkecil, 2. Tukar dengan elemen pertama, 3. Ulangi untuk elemen berikutnya.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa kompleksitas waktu terbaik dan terburuk dari Bubble Sort?
Best case: O(log n), Worst case: O(n)
Best case: O(n^2), Worst case: O(n^3)
Best case: O(n), Worst case: O(n log n)
Best case: O(n), Worst case: O(n^2)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bagaimana cara mengimplementasikan Bubble Sort di Python?
def bubble_sort(arr): n = len(arr) for i in range(n): for j in range(0, n-i-1): if arr[j] > arr[j+1]: arr[j], arr[j+1] = arr[j+1], arr[j] return arr
def bubble_sort(arr): return sorted(arr)
def bubble_sort(arr): arr.sort()
def bubble_sort(arr): for i in arr: print(i)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Sebutkan kelebihan dan kekurangan dari Selection Sort.
Kelebihan: menggunakan lebih sedikit memori, kompleksitas waktu O(n).
Kelebihan: sederhana, in-place. Kekurangan: kompleksitas waktu O(n^2), tidak efisien untuk dataset besar.
Kelebihan: cepat, efisien untuk dataset besar.
Kekurangan: mudah diimplementasikan, tidak memerlukan ruang tambahan.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Apa kompleksitas waktu dari Selection Sort?
O(log n)
O(n)
O(n log n)
O(n^2)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Jelaskan perbedaan antara Bubble Sort dan Selection Sort.
Selection Sort compares all elements before making a swap, while Bubble Sort does not.
Bubble Sort is faster than Selection Sort for all data sizes.
Bubble Sort sorts elements by their values, while Selection Sort sorts by their indices.
Bubble Sort compares and swaps adjacent elements, while Selection Sort selects the smallest element from the unsorted part and moves it to the sorted part.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
CPIT 201 Algorithms

Quiz
•
12th Grade - University
20 questions
Berpikir Komputasional Kelas X

Quiz
•
12th Grade
20 questions
Sorting Algorithms

Quiz
•
12th Grade
20 questions
ASAS SAINS KOMPUTER T3

Quiz
•
10th - 12th Grade
20 questions
Sains Komputer Tingkatan 5 - 3.1.2 Atur Cara dan Carta Alir

Quiz
•
10th - 12th Grade
10 questions
PENILAIAN HARIAN 2

Quiz
•
11th Grade - University
20 questions
Uji Pemahaman Berfikir Komputasional

Quiz
•
9th Grade - University
20 questions
Remedial SAS Informatika Kelas 8

Quiz
•
8th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade