Advent of code 2016/6
Ajax Direct

Answer

Part 1 :
Part 2 :
// ==================================================
// > PART 1
// ==================================================
$solution_1 = grid($input)->columns()->map(fn ($col) => $col->mostCommon())->join();

// ==================================================
// > PART 2
// ==================================================
$solution_2 = grid($input)->columns()->map(fn ($col) => $col->leastCommon())->join();