Write a function findpat that takes a long binary pattern i

Write a function \"findpat\" that takes a ## long binary pattern in $a0 and a smaller ## binary pattern in S$a1, and returns true ## if the long binary pattern contains the ## smaller one. ## For example 100111 base two contains 1001. ## ## Output format must be: ## \"Pattern found\"

Solution

//java here p1=$a0, p2=$a1

function findpat(p1, p2){

if(p1.indexOf(p2) != -1){

return \'Pattern Found\';

}

else{

return \'Pattern not Found\';

}

}

 Write a function \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site