I think that I have solved the given problem correctly as my code is running perfectly fine on other code editors. However, when I run my code in this code editor I am facing the following compilation error :
source.cpp: In function ‘int LinearSearch(int*, int)’:
source.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
16 | }
| ^
Kindly check my submitted code and inform me about any error that I might have made. Thank you.