Algorithm · Microsoft · Hard
You receive a collection of DNA pieces. Every piece is represented by three fields: start_tag, end_tag, and a free-form payload string. The tags indicate how pieces connect. Implement assemble(fragments, question_number), where fragments is the tuple list and question_number is 1, 2, or 3. Return a string for Question 1, the two joined strings for Question 2, and a list of all assembled sequences for Question 3. Requirements: Question 1: The fragments together describe one…
Checking your access…