MCPcopy Create free account
hub / github.com/chaharnishant11/CodeIn10DSA / main

Function main

C++/Code/SearchElementInArray.cpp:28–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26// { Driver Code Starts.
27
28int main()
29{
30 int testcases;
31 cin>>testcases;
32 while(testcases--)
33 {
34 int sizeOfArray;
35 cin>>sizeOfArray;
36 int arr[sizeOfArray];
37 int x;
38
39 for(int i=0;i<sizeOfArray;i++)
40 {
41 cin>>arr[i];
42 }
43 cin>>x;
44 Solution ob;
45 cout<<ob.search(arr,sizeOfArray,x)<<endl; //Linear search
46 }
47
48 return 0;
49
50}
51 // } Driver Code Ends

Callers

nothing calls this directly

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected