[開課學院]: 資電學院
[開課系所]: 資訊系
[課程名稱]: 資料結構
[老師名稱]: 劉振緒老師
[開課學期]: 1011
[類型]: 101-1期中考
8 problems
1. (10%) Describe a recursive algorithm for finding the maximum element
in an array A of n element.
2. (10%) Convert the following infix expressions to postfix:
- A*B+(C-D/E)/F
- (A/(B-C))*(D-E/F)
3. (10%) Describe what is abstract data type(ADTs).
4. (10%) Describe how to implement the Deque ADT (as defined in our text book)
using java.util.LinkedList.
5. (10%) Describe in detail an algorithm for reversing a (java.util) LinkedList
6. (20%) Suppose you have a deque D containing the numbers
(1,2,3,4,5,6,7,8,9),in this order.
7. (20%) Describe how to implement the stack ADT using two queues.
What is the runnung time of the push() and pop() methods in your solution?
8. (20%) Draw a binary tree T such that
-each node of T stores a single character,
-a postorder traversal of T yields CSISFUN, and
-an inorder traversal of T yields CNSSIUF.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 1.168.64.51