Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5963791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:18:58+00:00 2026-05-22T19:18:58+00:00

I was wondering how to save a Binary Tree that I have previously created.

  • 0

I was wondering how to save a Binary Tree that I have previously created.
Does anyone know how to do it?
Thank you so much.

PD: Here there is a link about how to implement a binary tree, I am using this pice od code:
http://code.activestate.com/recipes/286239-binary-ordered-tree/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:18:59+00:00Added an answer on May 22, 2026 at 7:18 pm

    One easy solution:
    – extend the current class to have a load and save method
    – add a unique id to each node
    – implement to do a top down parsing and save each node to a xml with a structure like that

    <node id="mynicelycrafteduniqueid">
        <data>...</data>
        <leftChild>childuniqueId</leftChild>
        <rightChild/> <!-- no right child -->
    </node>
    

    You’re done (if data is easily serialized at least), first node is your tree root.

    don’t forget fertilizer and your tree will be reborn even more beautiful

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im wondering if there is a command in V/Vim that will save a backup
I'm wondering if there is a tool that will save/push my MS Excel (or
I'm wondering if there's a way to save window configurations across emacs sessions. I
I was wondering if there is a way to save my Subversion password when
i was wondering if anyone knows how to stop xmldocument.Save() from reformatting the document.
Hey I was wondering if anyone could help to save the value of my
I'm wondering. If I have a form that is broken up into steps where
Just wondering if there is a good 'recipe' book that has compiled all/most of
I was wondering how it is possible to save an image created by imshow()
Wondering if there's any jquery library/plugin that can easily perform the following. At main

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.