Jump to content
Sign in to follow this  
lcstll

Mencipta Pgd

Recommended Posts

Dear friends, sila bantu.

#include<stdio.h>

#include <alloc.h>

#include <stdlib.h>

typedef char JENISUNSUR;

typedef struct PDedua{

JENISUNSUR data;

struct PDedua *anakL, *anakR;

} PDEDUA;

typedef PDEDUA PGD;

void main() {

PGD *p2;

int jwp;

CiptaPGD (&p2);

while (i!=7) {

printf("\n\nMENU PILIHAN\N");

printf("\n1.Input Item bagi pokok dedua");

printf("\n2.Papar Pokok dedua");

printf("\n3.Cari Suatu Item:");

printf("\n4.Cari Bapa untuk item semasa");

printf("\n5.Hapus Item");

printf("\n6.Cari anak kiri/anak kanan bagi suatu item");

printf("\n7.Keluar\n");

printf("\nSila masukkan pilihan anda:");

scanf("%d",&jwp);

}

...... lengkapkan program ini......

}

Share this post


Link to post
Share on other sites

apa pokok dedua dalam English?

Binary Tree = Pokok dedua,

Binary Search Tree = Pokok Gelintar dedua (PGD)

Pokok dedua = binary tree,

pokok gelintar dedua (PGD) = binary search tree (BST)

pokok dedua = binary tree,

pokok gelintar dedua (PGD) = binary search tree (BST)

Thanks!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...