Daftar

[HELP] Struktur Data Task in C (Algo)


Programming & Web Coding, web, aplikasi, dan karier developer.

Balas
 
Alat Thread
Braincode Braincode sedang offline
#1
Ceriwis Addicted Tanggal Bergabung: Nov 2011 Post: 4.638 Rep Power: 22 Braincode mempunyai hidup yang Normal
Default [HELP] Struktur Data Task in C (Algo)
Ane dpt tugas tp blm ngerti master...

Ane sangat berterima kasih klo ada yg bisa bantu ane...

Task nya kyk gini:




Quote:





Pls modify the algorithm to meet this requirement:

You can know whether the program will halt/terminate immediately when it hits the first false value.



We know that it is no use to explore the rest of the tree when we have found one false value. Though the rest exploration returns true values, the AND operation will yield a false.



Checking whether the number of node at certain level is complete (max number of node possible)-version 2






Quote:





function checkCompNodeAtLevelBT(input p:addr,input level:integer,

input currLevel:integer)>boolean

{return true if the number of node at given level is the most possible;

otherwise return false}

kamus:



algoritma:

if level=0 or p=Nil then

> false

else

if level=1 and p≠Nil then

> true

else

if currLevel true

else

> false

else

> false

else

> countNodeAtLevelBT(p^.left,level,currLevel+1) and

countNodeAtLevelBT(p^.right,level,currLevel+1)






Quote:





Evaluation:



type addr:^elTree

type elTree:

type Tree:

.

.

.

T:Tree

...

level:integer=3 {tree level of interest}

...

if checkCompNodeAtLevelBT(T.root,level,1) then

output(�The tree has complete node at level�,level)

else

output(�The tree has incomplete node at level�,level)

.

.

.





Need help master...

</div>
Balas


Aturan Posting
Kamu tidak boleh membuat thread baru
Kamu tidak boleh membalas
Kamu tidak boleh mengirim lampiran
Kamu tidak boleh mengedit post kamu

BB code Hidup
Smilie saat ini Hidup
Kode [IMG] adalah Hidup
Kode HTML adalah Mati


Terkait
Thread Pembuat Thread Forum Balasan Postingan Terakhir
[need help] TANTANGAN BUAT YG MASTER STRUKTUR DATA C++ Darkc0der Programming & Web 0 20 Nov 2011 09:18 AM
MASTER,struktur data tolong saya dong ?? SinggahDapur Programming & Web 0 20 Nov 2011 02:09 AM
Tentang Struktur Data Darkc0der Programming & Web 0 20 Nov 2011 01:01 AM
[NEED HELP] Struktur Data Bahasa C Darkc0der Programming & Web 0 20 Nov 2011 12:53 AM
[?] OOP Java : Struktur Data Linuxmania Programming & Web 0 20 Nov 2011 12:34 AM