Share the link of GitHub repo that contains all the code
The one mention, in the beginning, does not contain all the code
Github repo for code
hello @jdgsijafw
for now , only that git repo is available.
if u stuck with any problem.
then feel free to use ask doubt .
we will provide u the required code and the required explanation
But I need the codes of all so if there a Github repo that can provide me it will be helpful
have already informed the mentor , if he will have .
then i will share it with u.
https://hack.codingblocks.com/app/practice/2/1044/problem
here is my different approach to solve the question but my
test case 0 got passed
test case 1 is showing run error
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
int n;
cin>>n;
int arr[100];
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
int key;
cin>>key;
auto it=find(arr,arr+n,key);
int index=it-arr;
if(index==n)
cout<<-1<<endl;
else
cout<<index;
return 0;
}
please create separate thread by using ask doubt .
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.