Functional fundamentals
- `val` versus `var`, and why immutability by default changes how you write concurrent code.
- Case classes - what you get for free, and why they pair with pattern matching.
- Pattern matching beyond a switch - destructuring, guards, and matching on type.
- `Option` instead of null, and `map`/`flatMap`/`getOrElse` rather than checking `isDefined`.
- `Either` and `Try` for error handling, and when each fits.
- Higher-order functions, and what referential transparency buys you.
Collections and the type system
- Immutable versus mutable collections, and which namespace you get by default.
- `map` versus `flatMap`, and a for-comprehension as sugar over them.
- Strict versus lazy evaluation, and what a `View` or `LazyList` is for.
- Traits as both interfaces and mixins, and linearisation when several are mixed in.
- Variance - covariance and contravariance, and why `List[+A]` is declared that way.
- Implicits (or `given`/`using` in Scala 3) - what they are for, and the honest acknowledgement that overuse makes code hard to follow.
Concurrency
- `Future` and the execution context, and why blocking inside one is a problem.
- Composing futures with `map` and `flatMap` rather than nesting callbacks.
- If the stack uses an effect system - Cats Effect or ZIO - expect questions about why a description of an effect beats an eagerly-started computation.
Spark, for data roles
RDD versus DataFrame versus Dataset and why DataFrames usually win through the optimiser, narrow against wide transformations, what causes a shuffle and why it is expensive, and data skew and how you detect it. Lazy evaluation and the action that triggers execution is a near-guaranteed question. The surrounding ground is in data engineer interview questions.
How deep it goes by level
- Junior: the fundamentals above, explained clearly. Nobody expects production scars yet, and saying what you have not done reads better than bluffing.
- Mid-level: the same ground plus a service or Spark job you have written. Expect follow-ups asking why you made a choice rather than whether you know the syntax.
- Senior: effect systems or type-level design choices, and performance work on real workloads. The recall questions get shorter and the judgement questions get longer.
Whatever the level, say your answers out loud rather than reading them. Most of what candidates lose in a Scala interview is lost between knowing something and explaining it under observation - the method is in how to use AI for interview prep.
Where CoPilot Interview fits
Disclosure: we build an interview assistant, so treat this as a disclosed pitch. CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds, with a permanent free tier that needs no credit card.
Frequently asked questions
What are the most common Scala interview questions?
`val` versus `var` and immutability, case classes and pattern matching, `Option` instead of null, `map` versus `flatMap` and for-comprehensions, traits and linearisation, and implicits. Data roles add Spark questions about shuffles and DataFrames.
Why use Option instead of null in Scala?
`Option` makes absence explicit in the type, so the compiler forces you to handle the empty case instead of discovering it as a runtime null pointer exception. Idiomatic use composes with `map`, `flatMap` and `getOrElse` rather than checking `isDefined` and calling `get`.
What are implicits used for in Scala?
Supplying context such as an execution context, providing type class instances, and extension methods. They are powerful and easily abused - a strong answer acknowledges that implicit resolution can make code hard to follow and says where you would draw the line.
What causes a shuffle in Spark?
Wide transformations such as `groupBy`, `join` and `repartition`, where data must move between partitions and across the network. Shuffles dominate the cost of most Spark jobs, which is why minimising them and watching for data skew is a recurring interview topic.
Walk into the round with a second pair of eyes
CoPilot Interview is a native Windows and macOS app that puts suggested answers on your own screen in about two seconds, across coding, system design and behavioral rounds. The free tier is permanent: 15 minutes a day, no credit card.
Try it free