Drop redundant reads
A genome assembler prunes its input before it stitches anything. The sequencer emits short reads, and a read that already sits whole inside another read carries no new sequence, so the pipeline drops it. Given reads, return the indexes of the reads to drop, ascending. Drop read i when some other read holds it as one contiguous stretch and that other read is longer, or when the other read has identical text and appears earlier in the list, since identical reads sit inside each other and the pipeline keeps the first copy. Matching is exact and case sensitive: lowercase marks a masked repeat region, so a lowercase read never matches an uppercase stretch. An empty read sits inside every read. Return an empty list when nothing is dropped.
contained_read_indexes(reads: list[str]) → list[int][["ACGTAC","GTA","TTTT"]]out[1][["AAGC","AAGC","GC"]]out[1,2][["ACGT","TGCA"]]out[]State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
[["ACGTAC","GTA","TTTT"]][1]not run yetsample[["AAGC","AAGC","GC"]][1,2]not run yetsample[["ACGT","TGCA"]][]not run yetsample