scala代寫 - Preliminary Part 3 (Scala, 3 Marks)
? This part is about the shunting yard algorithm by Dijkstra. The prelim?
inary part is due on 4 December at 5pm and worth 3%. Any 1% you
achieve in the preliminary part counts as your “weekly engagement”.
? Make sure the files you submit can be processed by just calling
scala <<filename.scala>> on the commandline.1 Use the template files
provided and do not make any changes to arguments of functions or to
any types. You are free to implement any auxiliary function you might
? Do not leave any test cases running in your code because this might
slow down your program! Comment out test cases before submission,
otherwise you might hit a time?out.
? Do not use any mutable data structures in your submissions! They are
not needed. This means you cannot create new Arrays or ListBuffers,
? Do not use return in your code! It has a different meaning in Scala than
in Java. It changes the meaning of your program, and you should never
? Do not use var! This declares a mutable variable. Only use val! ? Do not use any parallel collections! No .par therefore! Our testing and
marking infrastructure is not set up for it.
Also note that the running time of each part will be restricted to a maximum of
30 seconds on my laptop.