Algorithm Group 2
Algorithm Group 2 contains five exercises focused on searching, insertion, grouping, sorting, range classification, and transformation of integer collections.
The exercises progressively combine several common collection-processing operations.
Tasks
Task 1 — Maximum Value per Group
Process a two-dimensional integer collection and find the maximum value from each inner group.
The result contains one maximum value for every group.
Task 2 — Sorted Element Insertion
Insert a new integer into an already sorted slice while preserving its ascending order.
Task 3 — Fixed Range Grouping
Separate a collection of integers into three predefined numeric ranges and sort the values inside each resulting group.
Task 4 — Sorted Range Insertion
Insert multiple values into existing sorted groups.
Each value must be placed into the appropriate group while preserving sorting and preventing duplicate values.
Task 5 — Configurable Range Grouping
Filter a collection using lower and upper boundaries and then separate the selected values into three groups using configurable split boundaries.
Objectives
The exercises in this group provide practice with:
- nested slices
- maximum-value searching
- sorted insertion
- numeric ranges
- grouping
- filtering
- duplicate detection
- maintaining sorted collections
- configurable boundaries
Implementation
Read each individual task before selecting an implementation strategy.
The examples define the expected behavior for the provided input values, but implementations should solve the general problem described by each task.
Unless explicitly stated otherwise, do not design the implementation around the size or exact values of the example collections.
Where the original task leaves behavior ambiguous, the individual task page provides additional clarification.