The testing process: Implementing code or fixing bugs in PHP.
Motivation: Basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.
The testing process: Analyzing or writing code using basic language constructs.
Motivation: A programmer should use language as a tool, always taking advantage of language-specific data types and built-in functions.
Implement a groupByOwners function that:
- Accepts an associative array containing the file owner name for each file name.
- Returns an associative array containing an array of file names for each owner name, in any order.
For example, for associative array ["Input.txt" => "Randy", "Code.py" => "Stan", "Output.txt" => "Randy"] the groupByOwners function should return ["Randy" => ["Input.txt", "Output.txt"], "Stan" => ["Code.py"]].
- Example case: Wrong answer
- Each owner has a single file: Wrong answer
- Various files: Wrong answer