Scala

35 questions

Functional programming, case classes, traits, pattern matching, implicits, type system, Spark Scala, Akka, and Scala 3 features.

1JuniorFundamentalsGoldman SachsMorgan StanleyAmazon

val vs var vs def vs lazy val

Explain the difference between val, var, def, and lazy val in Scala. When do you use each?

🔒
2JuniorFundamentalsGoldman SachsAmazonFlipkart

Case Classes and Pattern Matching

What are case classes? How does pattern matching work in Scala?

🔒
3JuniorFundamentalsGoldman SachsAmazonJPMC

Traits and Mixins

How do traits work in Scala? What's the difference between traits and abstract classes?

🔒
4JuniorFundamentalsGoldman SachsAmazonFlipkart

Option, Some, None — Null Safety

How does Option work in Scala? Why is it better than null?

🔒
5JuniorFundamentalsAmazonGoldman SachsJPMC

Collections: List, Map, Seq, Set

Explain Scala's collection hierarchy. What are the key differences from Java collections?

🔒
6JuniorFundamentalsGoldman SachsAmazon

For-Comprehensions

How do for-comprehensions work in Scala? What do they desugar to?

🔒
7SeniorFundamentalsGoldman SachsMorgan StanleyAmazon

Either, Try, and Error Handling

Compare Option, Try, and Either for error handling in Scala. When do you use each?

🔒
🔒 28 more premium questions
Upgrade to PRO — ₹1,499/month
8JuniorFundamentalsGoldman SachsAmazonJPMC🔒 Premium

Companion Objects and apply/unapply

What are companion objects in Scala? Explain apply and unapply.

🧠 What they're really testing
🔒
9SeniorFundamentalsGoldman SachsGoogleAmazon🔒 Premium

Type System: Variance and Bounds

Explain covariance, contravariance, and invariance in Scala. What are type bounds?

🧠 What they're really testing
🔒
10SeniorFundamentalsGoldman SachsMorgan StanleyAmazon🔒 Premium

Implicit Conversions and Parameters

How do implicits work in Scala 2? How have they changed in Scala 3?

🧠 What they're really testing
🔒
11JuniorFunctional ProgrammingGoldman SachsAmazonJPMC🔒 Premium

Higher-Order Functions

What are higher-order functions? Show practical Scala examples.

🧠 What they're really testing
🔒
12SeniorFunctional ProgrammingGoldman SachsAmazon🔒 Premium

Currying and Partial Application

Explain currying and partial application in Scala. How are they used in practice?

🧠 What they're really testing
🔒
13SeniorFunctional ProgrammingGoldman SachsMorgan Stanley🔒 Premium

Monads: flatMap and For-Comprehension

What is a monad in Scala? Why should a data engineer care?

🧠 What they're really testing
🔒
14SeniorFunctional ProgrammingGoldman SachsGoogleAmazon🔒 Premium

Immutability and Persistent Data Structures

How does Scala achieve efficient immutability? What are persistent data structures?

🧠 What they're really testing
🔒
15SeniorFunctional ProgrammingGoldman SachsAmazon🔒 Premium

Tail Recursion

What is tail recursion? How does Scala optimize it? What's @tailrec?

🧠 What they're really testing
🔒
16SeniorFunctional ProgrammingGoldman SachsMorgan Stanley🔒 Premium

Type Classes

What are type classes in Scala? How do they differ from inheritance?

🧠 What they're really testing
🔒
17SeniorFunctional ProgrammingGoldman SachsAmazonJPMC🔒 Premium

Futures and Promises

How do Futures work in Scala? How do you handle async composition and error handling?

🧠 What they're really testing
🔒
18SeniorFunctional ProgrammingGoldman SachsAmazon🔒 Premium

Partial Functions and Pattern Matching Functions

What are PartialFunctions in Scala? How are they used with collect, orElse, and andThen?

🧠 What they're really testing
🔒
19JuniorSpark-Specific ScalaAmazonGoldman SachsJPMCFlipkart🔒 Premium

Spark with Scala: RDD Basics

How do you use RDDs in Spark with Scala? Show common transformations and actions.

🧠 What they're really testing
🔒
20JuniorSpark-Specific ScalaAmazonGoldman SachsJPMCFlipkart🔒 Premium

Spark DataFrames and Datasets in Scala

How do DataFrames and Datasets work in Scala Spark? What's the difference?

🧠 What they're really testing
🔒
21SeniorSpark-Specific ScalaAmazonGoldman SachsJPMC🔒 Premium

Spark UDFs in Scala

How do you create and use UDFs in Spark Scala? What are the performance implications?

🧠 What they're really testing
🔒
22SeniorSpark-Specific ScalaGoldman SachsAmazon🔒 Premium

Spark Implicit Conversions and Encoders

How do Spark's implicits work? What are Encoders and why are they needed?

🧠 What they're really testing
🔒
23SeniorSpark-Specific ScalaAmazonJPMCGoldman Sachs🔒 Premium

Spark Broadcast and Accumulators

Explain broadcast variables and accumulators in Spark Scala.

🧠 What they're really testing
🔒
24SeniorSpark-Specific ScalaAmazonGoldman SachsJPMCFlipkart🔒 Premium

Spark Window Functions in Scala

Show Spark window functions in Scala with practical examples.

🧠 What they're really testing
🔒
25SeniorSpark-Specific ScalaAmazonGoldman SachsNetflix🔒 Premium

Spark Structured Streaming in Scala

How does Structured Streaming work in Spark Scala? Show a Kafka-to-Delta pipeline.

🧠 What they're really testing
🔒
26SeniorSpark-Specific ScalaAmazonGoldman SachsJPMCFlipkart🔒 Premium

Spark Optimization: Partitioning and Caching

How do you optimize Spark jobs? Explain partitioning, caching, and common tuning techniques.

🧠 What they're really testing
🔒
27SeniorSpark-Specific ScalaAmazonGoldman Sachs🔒 Premium

Spark Error Handling in Scala

How do you handle errors and bad data in Spark Scala pipelines?

🧠 What they're really testing
🔒
28SeniorSpark-Specific ScalaAmazonGoldman Sachs🔒 Premium

Spark Testing in Scala

How do you unit test Spark code in Scala?

🧠 What they're really testing
🔒
29SeniorConcurrencyGoldman SachsMorgan StanleyJPMC🔒 Premium

Actors and Akka Basics

What is the Actor model? Show basic Akka actor usage in Scala.

🧠 What they're really testing
🔒
30SeniorConcurrencyGoldman SachsAmazon🔒 Premium

Scala Concurrency: Parallel Collections and Par

How do parallel collections work in Scala? When should you use them?

🧠 What they're really testing
🔒
31SeniorScala 3Goldman SachsGoogle🔒 Premium

Scala 3: given/using vs implicit

How does Scala 3 replace implicits? Explain given, using, and extension methods.

🧠 What they're really testing
🔒
32SeniorScala 3Goldman SachsGoogle🔒 Premium

Scala 3: Enums and Union Types

What are Scala 3 enums and union types? How do they improve over Scala 2?

🧠 What they're really testing
🔒
33LeadReal-World PatternsAmazonGoldman SachsJPMC🔒 Premium

Building a Data Pipeline in Scala

Design a production data pipeline in Scala/Spark. Show the architecture and key code.

🧠 What they're really testing
🔒
34SeniorReal-World PatternsAmazonGoldman SachsNetflix🔒 Premium

Scala Best Practices for Data Engineering

What are Scala best practices specific to data engineering?

🧠 What they're really testing
🔒
35JuniorReal-World PatternsAmazonGoldman Sachs🔒 Premium

sbt and Scala Project Structure

How do you structure a Scala/Spark project? Explain sbt basics.

🧠 What they're really testing
🔒