Awkward wording for 11.10 (v. 1.4.9)?

#1

Problem 11.10 (Implement Stack and Queue APIs Using Heaps) says:

“How would you implement a stack API using a heap and queue API using a heap?”

It didn’t make sense to me what you were asking for until I read the solution. (The problem is that it’s ambiguous whether the word “and” is connecting “stack API using a heap” to “queue API using a heap” or whether the word “and” is connecting “heap” to “queue.” Resolving that ambiguity requires backtracking, which you shouldn’t have to do when reading.)

To make it more clear, maybe word it like:

“How would you implement a stack API using a heap and implement a queue API using a heap?”

0 Likes

#2

Hey John,

We recently revised this problem and fixed this to “How would you implement a stack API using a heap?”

We remove the implementing queue part and move it to a variant since we feel it is duplicate and there is not so much interesting part in it.

0 Likes