1.

Consider the following dynamic programming implementation of the boolean parenthesization problem: Which of the following lines should be added to complete the “if(op[pos] == ‘|’)” part of the code?

A. False[row][col] += True[row][pos] * False[pos+1][col]; True[row][col] += t_row_pos * t_pos_col + False[row][pos] * False[pos+1][col];
B. False[row][col] += False[row][pos] * True[pos+1][col]; True[row][col] += t_row_pos * t_pos_col – True[row][pos] * True[pos+1][col];
C. False[row][col] += True[row][pos] * True[pos+1][col]; True[row][col] += t_row_pos * t_pos_col + True[row][pos] * True[pos+1][col];
D. False[row][col] += False[row][pos] * False[pos+1][col]; True[row][col] += t_row_pos * t_pos_col – False[row][pos] * False[pos+1][col];View Answer
Answer» E.


Discussion

No Comment Found

Related MCQs