Академический Документы
Профессиональный Документы
Культура Документы
17)
Review
the
definitions
of
the
STL
sequential
and
associative
containers
discussed
in
the
lecture
notes.
18)
Assuming
that
a
vector<int>
contains
the
numbers
{1,2,3,4,5},
write
a
statement
using
the
insert
function
so
that
the
element
6
is
placed
between
3
and
4
(i.e.
the
resulting
vector
contains
{1,2,3,6,4,5}.
Write
a
short
program
containing
your
statement
and
run
it
to
check
that
it
does
what
you
expect.
19)
What
is
a
function
object?
20)
Write
a
while
loop
that
reads
integers
from
standard
input
and
prints
them
on
standard
output
separated
by
spaces
until
the
end
of
file
on
standard
input
is
encountered.
21)
Define
a
binary
tree.
Define
a
binary
search
tree.
22)
Write
a
program
that
reads
strings
from
stdin,
inserts
them
in
a
set
container,
and
prints
them
sorted
on
stdout.
23)Write
a
program
that
does
the
same
as
in
problem
22
but
using
a
vector
container.
24)
What
is
a
binary
tree?
25)
What
is
a
binary
search
tree?
26)
What
is
a
binary
heap?
27)
Understand
where
to
add
an
element
in
a
binary
search
tree.