none
Algoritma PreOrder Traversal RRS feed

  • Pertanyaan

  • Kawan-kawan,

    Saya ada kesulitan untuk mengolah data tabel secara otomatis menggunakan metoda PreOrder Traversal. Dimana saya ada data yang ter-record didalam field ItemNumber. Nah dari data tersebut saya ingin mengisi field lft dan rgt secara otomatis. 
    Mudah2an ada kawan disini yang bisa membantu. 

    Ini struktur data yang ada di tabel. 

    create table tblAssemblies
    (
    PartNumber varchar(20) not null ,
    lft integer not null default 0,
    rgt integer not null default 0,
    ItemNumber varchar(20) not null primary key
    )
    
    
    insert into tblAssemblies (PartNumber ,ItemNumber ) values ('Main Assy', '0'),
    															('P-001','1'),
    															('P-002','2'),
    															('Assy 001','3'),
    															('P-001','3.1'),
    															('P-002','3.2'),
    															('P-003','3.3')

    Selasa, 30 Juli 2013 06.27

Jawaban

  • Hi

    Selamat datang di Forum MSDN

    Untuk permasalahan algoritma nya, kamu bisa melihat keterangan berikut

    http://www.programmerinterview.com/index.php/data-structures/preorder-traversal-algorithm/

    Saya akan tutup thread ini, jika ada update silahkan membuka thread baru

    Terima kasih

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Andy Nugraha

    TechNet Community Support

    Senin, 05 Agustus 2013 02.24
    Moderator

Semua Balasan

  • Saya masih belum bisa mengirimkan gambar karena harus menunggu persetujuan admin :(
    Selasa, 30 Juli 2013 06.29
  • Hi

    Selamat datang di Forum MSDN

    Untuk permasalahan algoritma nya, kamu bisa melihat keterangan berikut

    http://www.programmerinterview.com/index.php/data-structures/preorder-traversal-algorithm/

    Saya akan tutup thread ini, jika ada update silahkan membuka thread baru

    Terima kasih

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Andy Nugraha

    TechNet Community Support

    Senin, 05 Agustus 2013 02.24
    Moderator