At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
Here is link to the pset http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/pset3.pdf
I made the program without really knowing in full how the code works. I understand what the outputs should be and how to get em to output but I don't understand why the outputs are what they are.
on the last page of the link you posted, , it talks about substitution or finding matches, does that help in understanding the use of the output?
This is what I did http://dpaste.com/hold/528512/. Its kind of hard to explain I understand the syntax of how the program works but I guess what I don't understand is the mathematics on how the n+m+1==k gives you possible solutions
sorry forgot to say in my program its if n+length+1==k but yea thats the part I don't understand.
i'm looking at it now. one sec
i'm starting to think that n+m+1=k might not be true for all possible situations especially empty string and "blah blah.. " case
but thats what it said to do in the pset directions. Can you explain what it actually does to me because I only put it in because thats what the directions said I have no clue what it means.
let's take the example 'a' and 'gc' 'a' is at index 5 , and 5+ (length of a)+ 1 gives 7 the index of gc in the target string or the large string " ATGACATGCA"
does this help any?
first tuple really is ( 0,3,5,9) and 0,3,9 don't satisfy the condition n+m+1 = k - > 0+1+1, 3+1+1, 9+1+1 -> 2,5,11 is not equal to 7 (index of gc in the target string)
yes this somewhat helps how would I fix it so that it doesn't give wrong answers?
what part of n+m+1 = k doesn't help at the moment? what input gives you errors? is that input appropriate at all? Remember it says split the key string into two parts
i looked at the code in http://dpaste.com/hold/528512/ you can remove "count" from subStringMatchExact function