Sha256: 09c850ef87f9bb29b452e9f0a9c454ab06a38a63f3f4d4c6680c5904bd4c982d
Contents?: true
Size: 802 Bytes
Versions: 117
Compression:
Stored size: 802 Bytes
Contents
package dna // Histogram is a mapping from nucleotide to its count in given DNA. // Choose a suitable data type. type Histogram // DNA is a list of nucleotides. Choose a suitable data type. type DNA // Count counts number of occurrences of given nucleotide in given DNA. // // This is a method on the DNA type. A method is a function with a special receiver argument. // The receiver appears in its own argument list between the func keyword and the method name. // Here, the Count method has a receiver of type DNA named d. func (d DNA) Count(nucleotide byte) (int, error) { return 0, nil } // Counts generates a histogram of valid nucleotides in the given DNA. // Returns an error if d contains an invalid nucleotide. func (d DNA) Counts() (Histogram, error) { var h Histogram return h, nil }
Version data entries
117 entries across 117 versions & 1 rubygems