Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first commit #1318

Closed
wants to merge 7 commits into from
Closed
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
1 change: 1 addition & 0 deletions Linear Search/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1. https://leetcode.com/problems/two-sum/description/
30 changes: 30 additions & 0 deletions Linear Search/practise.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import java.util.*;

public class practise {

public static void bubbleSort(int arr[]) {
for(int turn=0; turn<arr.length-1; turn++) {
for(int j=0; j<arr.length-1-turn; j++) {
if(arr[j] > arr[j+1]) {
//swap
int temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
}
}

public static void printArr(int arr[]) {
for(int i=0; i<arr.length; i++) {
System.out.print(arr[i] + " ");
}
System.out.println();
}

public static void main(String[] args) {
int arr[] = {5, 4, 1, 3, 2};
bubbleSort(arr);
printArr(arr);
}
}
30 changes: 30 additions & 0 deletions Linear Search/question
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import java.util.*;

public class practise {

public static void bubbleSort(int arr[]) {
for(int turn=0; turn<arr.length-1; turn++) {
for(int j=0; j<arr.length-1-turn; j++) {
if(arr[j] > arr[j+1]) {
//swap
int temp = arr[j];
arr[j] = arr[j+1];
arr[j+1] = temp;
}
}
}
}

public static void printArr(int arr[]) {
for(int i=0; i<arr.length; i++) {
System.out.print(arr[i] + " ");
}
System.out.println();
}

public static void main(String[] args) {
int arr[] = {5, 4, 1, 3, 2};
bubbleSort(arr);
printArr(arr);
}
}
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# First-Contribution
Hi this is Aryan and this is my contribution.
This is my first contribution
hello anuj thanks for this video. Very Helpful
1. https://leetcode.com/problems/two-sum/description/