- Find the sum of all lines that has a syntax error (
corrupted), where every bracket that causes a syntax error is given a particular value. - FindFor each line that was
incomplete, completehas a syntax error compute the string of closing characters that when appended to the line and findwill make the autocomplete score ofline syntactically correct (i.e. "complete"). We then compute for this closing string an autocomplete score as follows: We set the completed portionscore initially to 0. For every line inThen for each character of the test dataclosing string, we weremultiply the score by 5 and then askedadd to it a point value associated with the closing character. Finally find the median of all the autocomplete scores where the number of such scores is guaranteed to be odd.
Became Hot Network Question
Became Hot Network Question