Function Trace
Not what you're looking for?
Trace the function f() and indicate its action on the list object alist.
template <typename T>
void f(list<T>& alist, list<T>::iterator iter)
{
if(iter != alist.end())
{
alist.push_front(*iter);
alist.erase(iter++);
f(alist.iter);
}
}
Purchase this Solution
Solution Summary
The expert examines a function trace.
Solution Preview
The function f() is to reverse an list.
For example, suppose alist = {1, 2, 3, 4, 5}
At the beginning, iter points to 1.
Then in the function f(), it does ...
Purchase this Solution
Free BrainMass Quizzes
Basic Networking Questions
This quiz consists of some basic networking questions.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Javscript Basics
Quiz on basics of javascript programming language.
C# variables and classes
This quiz contains questions about C# classes and variables.
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.