DATA Sutcthse

timer Asked: Oct 3rd, 2016

Question description


8. What is the meaning of private, protected, and public parts of classes? 

12. If classA includes a private variable n, a protected variable m, and a public variable k, and classB is
derived from classA, which of these variables can be used in classB? Can n become private in classB?protected?
public? How about variables m and k? Does it make a difference whether the derivation of classB was private, protected, or public? 


9. A linked list does not have to be implemented with pointers. Suggest other implementations of linked lists.

15. How can a singly linked list be implemented so that insertion requires
no test for whether head is null?

24. What is the maximum number of comparisons for optimal
 search for the 14 letters shown in Figure 3.19?

1. Reverse the order of elements on stack S

a. using two additional stacks

 b. using one additional queue

c. using one additional stack and some additional nonarray variables

4. Suggest an implementation of a stack to hold elements of two different types, such as structures and float numbers.

Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors