, , ,

[SOLVED] Csc 21200 exam 2

$25

File Name: Csc_21200__exam_2.zip
File Size: 160.14 KB

Categories: , , , Tags: , , ,
5/5 - (1 vote)

1. Write a function that take an unsorted linked list and return a linked list that is the
“histogram” of the input linked list. You should only have to go through the input once.
Input: H→5→5→8→4→4→5→5→1→6→3→T
Output: H→(1/1)→(3/1)→(4/2)→(5/4)→(6/1)→(8/1)→T
Note: (X/Y) – X is the value and Y is the count.
2. Write a class using two stacks of your stack class to simulate a priority queue and their
basic functions. Note: Assume lower values have a higher priority. All but one of the
basic functions should be constant time. Bonus points will be given if ALL basic
functions are constant time.
3. Write a recursive function that reverse a stack. Note: You can only use the basic
functions of the stack to manipulate it and no additional stack.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Csc 21200 exam 2
$25