Search an Element in an array | GFG | Coder Army Sheet | BRUTE & OPTIMAL | Java Solution

preview_player
Показать описание
Given an integer array and another integer element. The task is to find if the given element is present in array or not.

Example 1:

Input:
n = 4
arr[] = {1,2,3,4}
x = 3
Output: 2
Explanation: There is one test case
with array as {1, 2, 3 4} and element
to be searched as 3. Since 3 is
present at index 2, output is 2.

Links:

About:

Suraj Usrethe is a skilled Software Engineer with a passion for problem-solving and knowledge-sharing within the community, with the goal of fostering growth for all.

His expertise lies in Java programming and backend frameworks such as Spring and Spring Boot.

#coderarmysheet
#dsa #rohitnegi #DSAsheet
Рекомендации по теме
welcome to shbcf.ru