Types of collections

  • Immutable
    • Present under scala.collection.immutable
    • Such operations as addition, update, removal returns new instance of collection, leaving old collection unchanged
    • Used as default collection types
  • Mutable
    • Can be imported from scala.collection.mutable
    • Modification operations changes the collection state as a side effect

Collections hierarchy

Practice

  • You should have a github account
  • Do not push all your code to master. Create a new branch and open a pull request in the end. Otherwise, automatic tests will not run
  • Format all code using scalafmt, otherwise automatic tests will fail not even started