電機題解

112 台北科技大學 資料結構 考古題解答

題目(共 8 題)

16 分

Order the following functions by their growth rate from slowest to fastest: \(O(n),O(n^2),O(n\log n),O(\log n),O(n!),O\!\left(n^{\frac{1}{\log}}\right)\). (6 分)

購買後顯示這題的詳解
212 分

Convert the following conversion to postfix:

(a) Infix: \(a/b\times(c+d-e)-(f-g)\) (6 分)

(b) Prefix: \(\times\,/\,a-\times\,c\,b+d\,e-f\,g\) (6 分)

購買後顯示這題的詳解
315 分

Sort the following data in ascending order by using three methods:

700, 123, 487, 1101, 657, 53, 188, 25.

Show your steps.

(a) Bubble Sort (5 分) (b) Quick Sort (5 分) (c) Radix Sort (5 分)

[Note: Please choose the first key as pivot in quick sort.]

購買後顯示這題的詳解
410 分

Assume Data[1..100,1..100] is a two-dimensional integer array whose start address is \(00A0_{(16)}\). Please explain the possible addresses of Data[3,5]. (integer: 4 bytes) (10 分)

購買後顯示這題的詳解
512 分

Demonstrate the insertion of the keys into a hash table:

12, 5, 88, 128, 17, 10, 33, 45, 27, 14, 64, 129.

[Note: Each bucket contains only 1 slot.]

(a) Let the table have 13 buckets, and let the hash function be \(h(k)=k\bmod 13\) and collision resolved by linear probing. (6 分)

(b) Describe the difference between collision and overflow. (6 分)

購買後顯示這題的詳解
625 分

Given the following 10 numbers:

5, 3, 8, 2, 6, 7, 1, 9, 10, 4

(a) Construct a binary search tree for these numbers. Draw the resulting tree. (5 分)

(b) Show the postorder sequence of the obtained tree in (a). (5 分)

(c) Delete 8 from the obtained tree in (a) and show all possible resulting trees. (5 分)

(d) Construct a MIN-heap for these numbers using Top-Down Strategy. Draw the resulting heap. (5 分)

(e) Please Delete 1 from the obtained heap in (d) and show the resulting heap. (5 分)

購買後顯示這題的詳解
710 分

About graph:

A(G)\(v_1\)\(v_2\)\(v_3\)\(v_4\)\(v_5\)\(v_6\)\(v_7\)
\(v_1\)0500009
\(v_2\)5137000
\(v_3\)0310000
\(v_4\)0700102
\(v_5\)0001010
\(v_6\)0000100
\(v_7\)9002000

(a) A(G) is the adjacency matrix of G. Give the adjacency multi-lists graph representation of the graph. (5 分)

(b) Find minimum spanning tree of the graph via Kruskal’s algorithm (start from \(v_4\)). (5 分)

購買後顯示這題的詳解
810 分

Consider the tree below, show the output for each of functions:

CBDAFEG

(a) Given the following: (5 分)

void t1(TreeNode x)
{   if (x!=null)
    {   printf("%c", x->key);
        t1(x->right);
        t1(x->left);
        printf("%c", x->key);
    }
}

(b) Given the following: (5 分)

void t2(TreeNode x)
{   if (x!=null)
    {   t1(x->left);
        t1(x->right);
        printf("%c", x->key);
        t1(x->left);
    }
}
購買後顯示這題的詳解

北科資料結構其他年度

115114113

112 學年度北科其他科目

工程數學線性代數

北科電機所全部考古題 →