Hey, i am attaching my code for PS3 problem 1. i am struggling a bit with recursion so would appreciate any feedback. http://codepad.org/PB5EqcOq function checkP1() just compares results for test cases
Your code looks really good.
your recursive function does not allow for overlap - the instructions said to count the number of 'instances' of the key in the target string. http://codepad.org/IFQ7oe55 in that second example the answer should have been 5
good spot, i replaced +len(key) with +1
http://codepad.org/IM1yGVmb this is the code for problem 4. would love to see alternative implementations from other people. thanks
here's my substringmatchexact http://codepad.org/TAS57ZTP and prob 4 http://codepad.org/q3TslsV7 we get different answers for the tests
Join our real-time social learning platform and learn together with your friends!