Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Badguy13 Badguy13 is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 399
Rep Power: 15
Badguy13 mempunyai hidup yang Normal
Default Menggabungkan Tree per level

ni program sndiri gan.....

ada yg isa bntuin gabungin masing2 level ga gan??

THx before......



import java.util.*;

import java.io.*;

class Node

{

String ortu,isi;

int jumanak,jumchild;

Node child[] = new Node[3];



public Node(String parent, String a)

{

ortu=parent;

isi=a;

jumanak=jumchild;

}

}



public class tree

{

private Node root;



private boolean isEmpty()

{

return (root == null);

}



public void insert(String x,String y, int pos)

{

int coba;

coba = 0;

Node temp = new Node(x,y);

if (isEmpty())

{

root = temp;

System.out.println("root awal:"+root.isi);

root.jumchild=0;

}



else

{

root.jumchild++;

//System.out.println("jum child:"+root.jumchild+"y:"+y);

Node cursor = root,

parent = null;



coba = 1;

for ( int i=1;i
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Terkait
Thread Thread Starter Forum Replies Last Post
JUAL Keripik maicih level 3, level 5, level 10....... Reseller welcome!!! ^_^ WarungJajan Makanan & Minuman 0 23rd October 2012 09:56 AM
JUAL Buku Cambridge IGCSE, AS Level dan A Level dan Longman MURAH (Surabaya) bookwithme Buku Pelajaran 0 19th July 2012 02:16 PM
JUAL jual buku IGCSE cambridge A level maths n AS level inggris MURAH!!!! bookwithme Buku Pelajaran 0 19th July 2012 02:16 PM
AVL Tree & Binary Search Tree di C Braincode Programming 0 11th November 2011 01:32 PM
Bird is 70 feet in tree.. picture is level .. wtf.. and how.. lol Fotografer Nature & Wildlife 0 27th November 2010 04:44 PM

 


All times are GMT +7. The time now is 11:40 AM.