Trying to serialize and unserialze a Binary search tree to a file
Posted
by
ClearMist
on Stack Overflow
See other posts from Stack Overflow
or by ClearMist
Published on 2013-11-09T03:04:04Z
Indexed on
2013/11/09
3:54 UTC
Read the original article
Hit count: 100
java
I am trying to find a way to use these methods to save and restore a binary search tree that contains names and phone numbers in each node.
I am just very lost and how to go about doing this.
'public void save(String fileName) {
// TODO : implement this method.
// save bst to its original shape.
}
public void restore(String fileName) {
// TODO : implement this method.
// restore bst from a file, if file exists.
// do nothing, otherwise.
File fichier = new File(fileName);
if (fichier.exists()) {
}
}'
© Stack Overflow or respective owner