Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions LinearSearch/linear.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.company.LinearSearch;
import java.util.Scanner;
public class linear{

public static void main(String[] args){
Scanner sc=new Scanner(System.in);
System.out.print("Enter the size of array: ");
int n=sc.nextInt();
int[] arr=new int[n];
for(int i=0;i<n;i++)
{
arr[i]=sc.nextInt();
}
System.out.print("Enter the number to be searched : ");
int x=sc.nextInt();
for(int i=0;i<n;i++)
{
if(arr[i]==x)
System.out.println("element found");
}
}
}
Binary file added src/com/company/BinarySearch/angry_birds.class
Binary file not shown.
55 changes: 0 additions & 55 deletions src/com/company/BinarySearch/angry_birds.java

This file was deleted.