Question: /* * Complete the function below. */ string findNumber(vector arr, int k) { } code in C++ or Java heueg oting etor bloem The function


/* * Complete the function below. */ string findNumber(vector arr, int k) {
}
code in C++ or Java
heueg oting etor bloem The function must return a string YES or NO dencting t the element is present in the array or not. Given an unsurled 'dy urn eleneris rind ithe element k is present in It'e ay or no! Complete the nNumeer!unction in the editor below. It has 2 parameters: 2. An integer, k denoting the element to be searched in the array. Input Format The first line contains an integer n, denoting the number of elements in the array a ach line i t then subsecuent line; (where (x n cnntains an integer describing arr. The next lina containa an intogor, k, the clomant that noads to ba searched Constraints ns 1s arts 10 Output Format T ne function must return a string .YES ar NO. denating it tha Flement Present in the amayar not. This is printed to stdout hy lacked stub code n the editM. Sample Input 0 Sample Output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
