Search Header Logo

Pohon Struktur Data

Authored by RIZQI SEBASTIAN

Computers

9th Grade

Pohon Struktur Data
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Apa yang dimaksud dengan struktur data pohon?

Struktur data pohon adalah kumpulan data yang tidak terhubung

Struktur data pohon hanya terdiri dari simpul anak tanpa simpul induk

Struktur data pohon tidak memiliki hirarki antar simpul

Struktur data pohon adalah representasi hirarkis data yang terdiri dari simpul-simpul yang saling terhubung. Setiap simpul memiliki satu simpul induk dan nol atau lebih simpul anak.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Apa perbedaan antara pohon biner dan pohon n-ary?

Jumlah anak maksimum yang dapat dimiliki oleh setiap node: pohon biner (3), pohon n-ary (lebih dari 2)

Jumlah anak maksimum yang dapat dimiliki oleh setiap node: pohon biner (2), pohon n-ary (lebih dari 2)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Bagaimana cara mengimplementasikan pohon menggunakan linked list?

The tree is implemented using a stack data structure

Each node in the tree is represented as a struct containing data and pointers to its children nodes. The struct has fields for data and pointers to left and right child nodes, linking nodes together based on their relationships in the tree.

Each node in the tree is represented as a class with no pointers

The tree is implemented using a hash table

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Apa itu traversal dalam pohon dan sebutkan jenis-jenisnya?

Breadth-first, Depth-first, Breadth-order, Depth-order

In-order, pre-order, post-order, level-order

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Jelaskan konsep binary search tree (BST) dan berikan contoh.

Contoh: 1 2 3 4 5 6 7

Contoh: 3 2 1 4 5 6 7

Contoh: 4 / \ 2 6 / \ / \ 1 3 5 7

Contoh: 4 2 1 3 5 6 7

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Apakah keuntungan menggunakan pohon AVL dibandingkan dengan pohon biner biasa?

AVL tree memiliki kompleksitas waktu operasi yang lebih buruk daripada pohon biner biasa

AVL tree tidak memerlukan operasi rotasi

AVL tree tidak dapat digunakan untuk penyimpanan data

AVL tree memiliki keseimbangan yang lebih baik dan kompleksitas waktu operasi yang lebih baik (O(log n)).

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Bagaimana cara menambahkan node baru ke dalam pohon biner?

Langkah-langkahnya adalah: langsung menambahkan node baru tanpa memperhatikan nilai node saat ini

Langkah-langkahnya adalah: bandingkan nilai node baru dengan nilai node saat ini, pergi ke subtree kiri jika lebih kecil, pergi ke subtree kanan jika lebih besar, ulangi langkah 2 sampai mencapai leaf node, tambahkan node baru sebagai leaf node sesuai perbandingan nilai.

Menambahkan node baru di posisi acak tanpa memperhatikan struktur pohon biner

Menghapus node yang sudah ada dan menambahkan node baru di tempatnya

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?