Lecture 11

The simple one is to just call insert over and over

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: two solutions. The simple one is to just call insert over and over again. The complicated one takes advantage of the fact that the numbers are sorted in the file, and it does not need some of the work that insert is doing. 17 next) 16 void Restore1(char *fname) { int X; Boolean Success; ifstream F(fname, ios::binary); head = NULL; while (F >> X ) listInsert(X , Success); } 18...
View Full Document

This document was uploaded on 03/31/2014 for the course CS 114 at NJIT.

Ask a homework question - tutors are online