Question: (1) Python: Create FrequentWords() algorithm using the PatternCount() method (a) Example Input: Text = BABBASDCABCBABDDASDBBCASDBAB, k = 3 output: 'BAB', 'ASD' (b) do not use

(1) Python: Create FrequentWords() algorithm using the PatternCount() method

(a) Example

Input: Text = "BABBASDCABCBABDDASDBBCASDBAB", k = 3

output: 'BAB', 'ASD'

(b) do not use a dictionary

(c). Use the following pseudocode:

FrequentWords(Text, k) FrequentPatterns <-- an emty set for i <-- 0 to |Text| - k Pattern <-- the k-mer Text(i,k) Count(i) <-- PatternCount(Text,Pattern) maxCount <-- max value in array Count for i <-- 0 to |Text| - k if Count(i) = maxCount add Text(i,k) to FrequentPatterns remove duplicates from FrequentPatterns return FrequentPatterns

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 Databases Questions!