{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


27-Section-Handout - CS106X Winter 2008 Handout 27 Section...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS106X Handout 27 Winter 2008 February 13, 2008 Section Handout Problem 1: Removing Duplicates Write a function RemoveDuplicates that given a linked list will remove and free the second of all neighboring duplicates found in the list. If the incoming list is (5 5 22 37 89 89 15 15 22) the function will destructively modify the list to contain (5 22 37 89 15 22). Don't worry about duplicate sequences longer than 2 or duplicates that aren't right next to each other in the list. struct node { int value; node *next; }; void RemoveDuplicates(node *list); Problem 2: Ribonucleic Acid and Codons Ribonucleic acid—more commonly referred to as RNA—consists of a series of molecular subunits chained together to form a polymer. Each of these subunits is constrained to be one of four nucleotides : adenine ( A ), guanine ( G ), uracil ( U ), or cytosine ( C ). Genetic information is expressed via tri-nucleotide units (such as UAC or GGU ) called codons , so that an RNA strand of 36 nucleotides, for example, is really a sequence of 12 codons. By crawling over a
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}