阿摩線上測驗
登入
首頁
>
研究所、轉學考(插大)◆森林經營學
>
110年 - 110 國立臺灣大學_碩士班招生考試_森林環境暨資源研究所丙組:森林經營學#100869
> 申論題
三、國有林與私有林在森林經營方面,有甚麼相同及相異之處?
相關申論題
四、我國木材長年仰賴進口,請說明長期此種情形,對於台灣森林經營有哪些負面影響?有何因應對策?
#422567
1.(20%) Given a string c consist of"!" and "I" symbols, for every right parenthesis there exists a matching left parenthesis, we said that string is a balanced parentheses sequ quence. For example, are balanced parentheses sequence. On the other hand, are not balanced parentheses sequence. Plcase implement a function balanced_ parenthese (seq) which takes one string seq as the parameter. The function wil return true if the string seg is a balanced parentheses sequence or false otherwise.
#422568
a.(10%) According to the sentence "this is an example of a buffman tree", please generate the Huffman code tablc and encode the above sentence with your code table.
#422569
b.(10%) Given a string S which consist of space char and lower case letters (i.e.,', 'a', ...,'2), implement a function huffman_code (str) which can output the huffiman code table which is optimized to the input string S and convert the str into a bit pattem according to the generated hufiman code table.
#422570
3.(20%) A sum-product number in a given number base b is a natural number that is equal to the product of the sum of its digits and the product of its digits. For example, the number ]44 in base 10 is a sum- -product numbet, because 1 + 4 + 4= 9, (1)(4)(4) = 16, and (9) (16)= 144. Please implement a function is_ sum product_ number (x) to check whether a natural number x is a sum-product number in base 10.
#422571
a.(10%) Please implement the heapsort algorithm. heapsort (list, n). list: an array or a list, count: the number of data in the 1 ist that needs to be sort.
#422572
b. (5%) Is heapsort a stable sorting algorithm?
#422573
c. (5%) What is the time complexity of heapsort in worst case?
#422574
a. Coupling and Cohesion
#422575
b. Abstract Data Type and Encapsulation
#422576
相關試卷
110年 - 110 國立臺灣大學_碩士班招生考試_森林環境暨資源研究所丙組:森林經營學#100869
110年 · #100869