Question: Code Challenge: Solve the 2 - Break Distance Problem. - Input: Genomes ( P ) and ( Q ) . -

Code Challenge: Solve the 2-Break Distance Problem.
- Input: Genomes \( P \) and \( Q \).
- Output: The 2-break distance \( d(P, Q)\).
Currently supported languages are: Python, C++, Java, Go. We would love to add more languages in the future! For now, to get credit for the problem, you will need to code in one of the supported languages. If you want to solve this problem in another language and are not interested in receiving points, then please check out the ungraded "Rosalind-style" problem at the end of this chapter.
You may be wondering how the graph representation that we have been using for breakpoint graphs could be transformed into an adjacency list. After all, we haven't even labeled the nodes of this graph! Check out Charging Station: From Genomes to the Breakpoint Graph to see how to transform a genome into a graph that is easier to work with in our implementations.
Debug Datasets
Please let us know about your experience with the autograded code challenges by taking our short survey.
Sample Input:
(+1+2+3+4+5+6)
(+1-3-6-5)(+2-4)
Sample Output:
3
What it's asking us to expand upon:
import sys
from typing import List, Dict, Iterable, Tuple
Please do not remove package declarations because these are used by the autograder.
Insert your two_break_distance function here, along with any subroutines you need
def two_break_distance(P: List[List[int]], Q: List[List[int]])-> int:
"""
Calculate the two-break distance between two genomes P and Q.
"""
pass
Code Challenge: Solve the 2 - Break Distance

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!