cws/cw03.tex
changeset 110 62389faa66e4
parent 100 93260be6770f
child 152 114a89518aea
equal deleted inserted replaced
109:293ea84d82ca 110:62389faa66e4
    13 sure the files you submit can be processed by just calling
    13 sure the files you submit can be processed by just calling
    14 \texttt{scala <<filename.scala>>}.\bigskip
    14 \texttt{scala <<filename.scala>>}.\bigskip
    15 
    15 
    16 \noindent
    16 \noindent
    17 \textbf{Important:} Do not use any mutable data structures in your
    17 \textbf{Important:} Do not use any mutable data structures in your
    18 submission! They are not needed. This excludes the use of
    18 submission! They are not needed. This menas you cannot use 
    19 \texttt{ListBuffer}s, for example. Do not use \texttt{return} in your
    19 \texttt{ListBuffer}s, for example. Do not use \texttt{return} in your
    20 code! It has a different meaning in Scala, than in Java.  Do not use
    20 code! It has a different meaning in Scala, than in Java.  Do not use
    21 \texttt{var}! This declares a mutable variable.  Make sure the
    21 \texttt{var}! This declares a mutable variable.  Make sure the
    22 functions you submit are defined on the ``top-level'' of Scala, not
    22 functions you submit are defined on the ``top-level'' of Scala, not
    23 inside a class or object. Also note that the running time of
    23 inside a class or object. Also note that the running time of
    24 each part will be restricted to a maximum of 360 seconds. 
    24 each part will be restricted to a maximum of 360 seconds on my
    25 
    25 laptop.
    26 
    26 
    27 
    27 
    28 \subsection*{Disclaimer!!!!!!!!}
    28 
       
    29 \subsection*{Disclaimer}
    29 
    30 
    30 It should be understood that the work you submit represents
    31 It should be understood that the work you submit represents
    31 your own effort! You have not copied from anyone else. An
    32 your own effort! You have not copied from anyone else. An
    32 exception is the Scala code I showed during the lectures or
    33 exception is the Scala code I showed during the lectures or
    33 uploaded to KEATS, which you can freely use.\bigskip
    34 uploaded to KEATS, which you can freely use.\bigskip
    51       &   $|$ & $r^*$       & can match zero or more times $r$\\
    52       &   $|$ & $r^*$       & can match zero or more times $r$\\
    52 \end{tabular}
    53 \end{tabular}
    53 \end{center}
    54 \end{center}
    54 
    55 
    55 \noindent 
    56 \noindent 
    56 Why? Knowing how to match regular expressions and strings fast will
    57 Why? Knowing how to match regular expressions and strings will
    57 let you solve a lot of problems that vex other humans. Regular
    58 let you solve a lot of problems that vex other humans. Regular
    58 expressions are one of the fastest and simplest ways to match patterns
    59 expressions are one of the fastest and simplest ways to match patterns
    59 in text, and are endlessly useful for searching, editing and
    60 in text, and are endlessly useful for searching, editing and
    60 analysing text in all sorts of places. However, you need to be
    61 analysing text in all sorts of places. However, you need to be
    61 fast, otherwise you will stumble over problems such as recently reported at
    62 fast, otherwise you will stumble over problems such as recently reported at