Maximum independent test batch
Your task
A test runner packs as many suites as it can into one parallel batch. clash_rows gives a square table one row at a time: character j of row i is y when suite i and suite j fight over the same fixture and so cannot run together, and n otherwise. The table is symmetric and every character on its diagonal is n. Return the size of the biggest batch, meaning the largest number of suites that can be chosen so that no chosen suite fights another chosen one. Choosing a single suite is always safe, so the answer is at least 1 once a suite exists. Return 0 when the table is empty. The runner handles at most 26 suites.
Examples
largest_parallel_batch(clash_rows: list[str]) -> intExample 1
Input
largest_parallel_batch(["nn", "nn"])Output
2Example 2
Input
largest_parallel_batch(["nynn", "ynyn", "nyny", "nnyn"])Output
2Example 3
Input
largest_parallel_batch(["nyyyyy", "ynyyyy", "yynyyy", "yyynyy", "yyyyny", "yyyyyn"])Output
1