Task: Sort MongoDB Documents by Array Length
Task: Sort MongoDB Documents by Array Length: a task in Terminal-Lego-15k (Harbor dataset). You are given a small MongoDB dataset containing documents with an answers array. Your task is to write a terminal-friendly solution that returns the documents sorted by the number of items in the answers…
The task
You are given a small MongoDB dataset containing documents with an `answers` array. Your task is to write a terminal-friendly solution that returns the documents sorted by the number of items in the `answers` array, from smallest to largest.
Part of PrimeIntellect/Terminal-Lego-15k.