Challenge: Factory Quality Control
Swipe to start coding
A factory receives multiple batches of parts, but some parts are defective and must be removed to identify high-quality components, which should be displayed without duplicates.
The PartBatch
class represents a batch of parts, with a batch name (batchName
) and a list of parts (parts
). To access the list of parts from a batch, you use the getParts()
method, and to retrieve the batch name, you use the getBatchName()
method.
- Extract all parts from each batch using
flatMap()
method. - Filter out defective parts by checking if the part name starts with
Defective
usingfilter()
method. - Remove duplicate parts to get a list of unique quality parts using
distinct()
method.
Ratkaisu
solution.java
Kiitos palautteestasi!
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 2.33Awesome!
Completion rate improved to 2.33
Challenge: Factory Quality Control
Swipe to start coding
A factory receives multiple batches of parts, but some parts are defective and must be removed to identify high-quality components, which should be displayed without duplicates.
The PartBatch
class represents a batch of parts, with a batch name (batchName
) and a list of parts (parts
). To access the list of parts from a batch, you use the getParts()
method, and to retrieve the batch name, you use the getBatchName()
method.
- Extract all parts from each batch using
flatMap()
method. - Filter out defective parts by checking if the part name starts with
Defective
usingfilter()
method. - Remove duplicate parts to get a list of unique quality parts using
distinct()
method.
Ratkaisu
solution.java
Kiitos palautteestasi!
single
Awesome!
Completion rate improved to 2.33
Challenge: Factory Quality Control
Pyyhkäise näyttääksesi valikon
Swipe to start coding
A factory receives multiple batches of parts, but some parts are defective and must be removed to identify high-quality components, which should be displayed without duplicates.
The PartBatch
class represents a batch of parts, with a batch name (batchName
) and a list of parts (parts
). To access the list of parts from a batch, you use the getParts()
method, and to retrieve the batch name, you use the getBatchName()
method.
- Extract all parts from each batch using
flatMap()
method. - Filter out defective parts by checking if the part name starts with
Defective
usingfilter()
method. - Remove duplicate parts to get a list of unique quality parts using
distinct()
method.
Ratkaisu
solution.java
Kiitos palautteestasi!